fix focus of warning when editing prefs if any notebook tabs open

This commit is contained in:
gimick 2010-06-24 22:47:42 +01:00
parent bd440f3008
commit 0de6d20340

View File

@ -284,12 +284,12 @@ class fpdb:
if len(self.nb_tab_names) == 1: if len(self.nb_tab_names) == 1:
# only main tab open, reload profile # only main tab open, reload profile
self.load_profile() self.load_profile()
dia.destroy()
else: else:
dia.destroy() # destroy prefs before raising warning, otherwise parent is dia rather than self.window
self.warning_box("Updated preferences have not been loaded because " self.warning_box("Updated preferences have not been loaded because "
+ "windows are open. Re-start fpdb to load them.") + "windows are open. Re-start fpdb to load them.")
dia.destroy()
def dia_maintain_dbs(self, widget, data=None): def dia_maintain_dbs(self, widget, data=None):
self.warning_box("Unimplemented: Maintain Databases") self.warning_box("Unimplemented: Maintain Databases")
return return