From 52bd81b773ea7ede0fbab69ce7662a0373bf609a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 22 Feb 2012 17:23:19 +0100 Subject: [PATCH] Block update_profiles when clearing profile entries Otherwise the wrong profile can be updated as update_profiles will be called before the new profile is selected. issue2458 --- tryton/gui/window/dblogin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tryton/gui/window/dblogin.py b/tryton/gui/window/dblogin.py index 6c992f3d7c..393464e077 100644 --- a/tryton/gui/window/dblogin.py +++ b/tryton/gui/window/dblogin.py @@ -173,10 +173,12 @@ class DBListEditor(object): def clear_entries(self): for entryname in ('host', 'port', 'database', 'username'): entry = getattr(self, '%s_entry' % entryname) + entry.handler_block_by_func(self.update_profiles) if entryname == 'port': entry.set_text('8000') else: entry.set_text('') + entry.handler_unblock_by_func(self.update_profiles) self.current_database = None self.database_combo.set_active(-1) self.database_combo.get_model().clear()