5472: Update gramplets when database changed so that they correctly show if they have data. Also remove superfluous updates.

svn: r18679
This commit is contained in:
Nick Hall
2012-01-01 17:58:33 +00:00
parent f6271eb127
commit 24976ab0a6
13 changed files with 3 additions and 42 deletions

View File

@@ -67,9 +67,9 @@ class Gramplet(object):
self.gui.on_motion)
self.connect_signal('Person', self._active_changed)
self._db_changed(self.dbstate.db)
active_person = self.get_active('Person')
if active_person: # already changed
self._db_changed(self.dbstate.db)
self._active_changed(active_person)
self.post_init()
@@ -284,6 +284,8 @@ class Gramplet(object):
if self.dbstate.open:
#print " %s is not active" % self.gui.gname
self.update_has_data()
else:
self.set_has_data(False)
return
#print " %s is UPDATING" % self.gui.gname
self.dirty = False