diff -r e9e7eca7efee -r bf71ee032bb4 src/eric7/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgUnshelveDataDialog.py --- a/src/eric7/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgUnshelveDataDialog.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgUnshelveDataDialog.py Wed Jul 13 14:55:47 2022 +0200 @@ -16,35 +16,35 @@ """ Class implementing a dialog to enter the data for an unshelve operation. """ + def __init__(self, shelveNames, shelveName="", parent=None): """ Constructor - + @param shelveNames list of available shelves (list of string) @param shelveName name of the shelve to restore (string) @param parent reference to the parent widget (QWidget) """ super().__init__(parent) self.setupUi(self) - + self.nameComboBox.addItem("") self.nameComboBox.addItems(sorted(shelveNames)) - + if shelveName and shelveName in shelveNames: - self.nameComboBox.setCurrentIndex( - self.nameComboBox.findText(shelveName)) - + self.nameComboBox.setCurrentIndex(self.nameComboBox.findText(shelveName)) + msh = self.minimumSizeHint() self.resize(max(self.width(), msh.width()), msh.height()) - + def getData(self): """ Public method to get the user data. - + @return tuple containing the name (string) and a flag indicating to keep the shelved change (boolean) """ return ( self.nameComboBox.currentText().replace(" ", "_"), - self.keepCheckBox.isChecked() + self.keepCheckBox.isChecked(), )