From 5c4717b53c1f6823b53fdb841815fc7150a8f88e Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 13 Jul 2015 22:59:02 +0200 Subject: [PATCH] use signal disconnect instead of boolean --- gui/qt/main_window.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index 510804da6..e987234fc 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -2478,7 +2478,6 @@ class ElectrumWindow(QMainWindow): def settings_dialog(self): self.need_restart = False - self.settings_dialog_visible = True d = QDialog(self) d.setWindowTitle(_('Preferences')) d.setModal(1) @@ -2548,8 +2547,6 @@ class ElectrumWindow(QMainWindow): alias = self.config.get('alias','') alias_e = QLineEdit(alias) def set_alias_color(): - if not self.settings_dialog_visible: - return if not self.config.get('alias'): alias_e.setStyleSheet("") return @@ -2673,7 +2670,7 @@ class ElectrumWindow(QMainWindow): # run the dialog d.exec_() - self.settings_dialog_visible = False + self.disconnect(self, SIGNAL('alias_received'), set_alias_color) run_hook('close_settings_dialog') if self.need_restart: