diff --git a/pupgui2/pupgui2customiddialog.py b/pupgui2/pupgui2customiddialog.py index 27183da3..f509060a 100644 --- a/pupgui2/pupgui2customiddialog.py +++ b/pupgui2/pupgui2customiddialog.py @@ -45,8 +45,8 @@ def setup_ui(self): self.txtIdBrowseAction = self.ui.txtInstallDirectory.addAction(QIcon.fromTheme('document-open'), QLineEdit.TrailingPosition) self.txtIdBrowseAction.triggered.connect(self.txt_id_browse_action_triggered) + self.ui.txtInstallDirectory.textChanged.connect(lambda text: self.ui.btnSave.setEnabled(self.is_valid_custom_install_path(text))) custom_install_directory = config_custom_install_location().get('install_dir', '') - self.ui.txtInstallDirectory.setText(custom_install_directory) self.ui.btnDefault.setEnabled(self.has_custom_install_directory(custom_install_directory)) # Don't enable btnDefault if there is no Custom Install Directory set @@ -60,8 +60,6 @@ def setup_ui(self): self.ui.btnDefault.clicked.connect(self.btn_default_clicked) self.ui.btnClose.clicked.connect(self.ui.close) - self.ui.txtInstallDirectory.textChanged.connect(lambda text: self.ui.btnSave.setEnabled(self.is_valid_custom_install_path(text))) - def btn_save_clicked(self): install_dir: str = os.path.expanduser(self.ui.txtInstallDirectory.text().strip()) if not install_dir.endswith(os.sep):