From 957ebc65620a83a57215395cb38a54cd237e4e8c Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Sun, 15 Sep 2024 17:43:17 +0100 Subject: [PATCH] CID: Connect `txtInstallDirectory.textChanged` sooner --- pupgui2/pupgui2customiddialog.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pupgui2/pupgui2customiddialog.py b/pupgui2/pupgui2customiddialog.py index 6b7c125b..61fe88a2 100644 --- a/pupgui2/pupgui2customiddialog.py +++ b/pupgui2/pupgui2customiddialog.py @@ -45,6 +45,7 @@ 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))) self.ui.txtInstallDirectory.setText(config_custom_install_location().get('install_dir', '')) self.ui.comboLauncher.addItems([ @@ -57,8 +58,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):