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
This commit is contained in:
Cédric Krier committed 2012-02-22 17:23:19 +01:00
1 parent e1aa70db0e
commit 52bd81b773
1 file changed
+2
+2
View File
@@ -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()