diff --git a/ChangeLog b/ChangeLog index de8eee743..8b1af016c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2007-10-03 Benny Malengier + * src/PageView.py: correct bug not going to bookmark if no active person + * src/DataViews/_MediaView.py: + * src/DataViews/_RepositoryView.py: + * src/DataViews/_SourceView.py: + * src/DataViews/_EventView.py: + * src/DataViews/_FamilyList.py: + * src/DataViews/_PedigreeView.py: + * src/DataViews/_PlaceView.py: + * src/DataViews/_PersonView.py: + * src/DataViews/_RelationView.py: + after import, redraw bookmark menu + 2007-10-03 Benny Malengier * src/DataViews/_PedigreeView.py: correctly load bookmarks, issue 1271 * src/DataViews/_RelationView.py: correctly load bookmarks, issue 1271 diff --git a/src/DataViews/_EventView.py b/src/DataViews/_EventView.py index 18c381159..cf58c1be3 100644 --- a/src/DataViews/_EventView.py +++ b/src/DataViews/_EventView.py @@ -83,7 +83,7 @@ class EventView(PageView.ListView): 'event-add' : self.row_add, 'event-update' : self.row_update, 'event-delete' : self.row_delete, - 'event-rebuild' : self.build_tree, + 'event-rebuild' : self.object_build, } self.func_list = { diff --git a/src/DataViews/_FamilyList.py b/src/DataViews/_FamilyList.py index 274821cae..ce0ba0a24 100644 --- a/src/DataViews/_FamilyList.py +++ b/src/DataViews/_FamilyList.py @@ -73,7 +73,7 @@ class FamilyListView(PageView.ListView): 'family-add' : self.row_add, 'family-update' : self.row_update, 'family-delete' : self.row_delete, - 'family-rebuild' : self.build_tree, + 'family-rebuild' : self.object_build, } self.func_list = { diff --git a/src/DataViews/_MediaView.py b/src/DataViews/_MediaView.py index f3faf8b1f..2c4df665d 100644 --- a/src/DataViews/_MediaView.py +++ b/src/DataViews/_MediaView.py @@ -93,7 +93,7 @@ class MediaView(PageView.ListView): 'media-add' : self.row_add, 'media-update' : self.row_update, 'media-delete' : self.row_delete, - 'media-rebuild' : self.build_tree, + 'media-rebuild' : self.object_build, } PageView.ListView.__init__( diff --git a/src/DataViews/_PedigreeView.py b/src/DataViews/_PedigreeView.py index 9a8ccc3e8..5af1e4a9b 100644 --- a/src/DataViews/_PedigreeView.py +++ b/src/DataViews/_PedigreeView.py @@ -631,7 +631,7 @@ class PedigreeView(PageView.PersonNavView): db.connect('person-add', self.person_rebuild) db.connect('person-update', self.person_rebuild) db.connect('person-delete', self.person_rebuild) - db.connect('person-rebuild', self.person_rebuild) + db.connect('person-rebuild', self.person_rebuild_bm) db.connect('family-update', self.person_rebuild) db.connect('family-add', self.person_rebuild) db.connect('family-delete', self.person_rebuild) @@ -650,6 +650,12 @@ class PedigreeView(PageView.PersonNavView): self.rebuild_trees(None) self.uistate.modify_statusbar(self.dbstate) + def person_rebuild_bm(self,dummy=None): + """Large change to person database""" + self.person_rebuild(dummy) + if self.active: + self.bookmarks.redraw() + def person_rebuild(self,dummy=None): self.format_helper.clear_cache() self.dirty = True diff --git a/src/DataViews/_PersonView.py b/src/DataViews/_PersonView.py index dc222c512..c414bc85f 100644 --- a/src/DataViews/_PersonView.py +++ b/src/DataViews/_PersonView.py @@ -416,7 +416,7 @@ class PersonView(PageView.PersonNavView): db.connect('person-add', self.person_added) db.connect('person-update', self.person_updated) db.connect('person-delete', self.person_removed) - db.connect('person-rebuild', self.build_tree) + db.connect('person-rebuild', self.person_rebuild) if self.active: self.build_tree() @@ -725,6 +725,12 @@ class PersonView(PageView.PersonNavView): def func(self, tree, path, ex_list): ex_list.append(self.model.mapper.top_path2iter[path[0]]) + def person_rebuild(self): + """Large change to person database""" + if self.active: + self.bookmarks.redraw() + self.build_tree() + def person_removed(self, handle_list): if not self.model: return diff --git a/src/DataViews/_PlaceView.py b/src/DataViews/_PlaceView.py index b7a3b33e8..852f924c9 100644 --- a/src/DataViews/_PlaceView.py +++ b/src/DataViews/_PlaceView.py @@ -90,7 +90,7 @@ class PlaceView(PageView.ListView): 'place-add' : self.row_add, 'place-update' : self.row_update, 'place-delete' : self.row_delete, - 'place-rebuild' : self.build_tree, + 'place-rebuild' : self.object_build, } self.func_list = { diff --git a/src/DataViews/_RelationView.py b/src/DataViews/_RelationView.py index fdc09bf7f..5ef07c70a 100644 --- a/src/DataViews/_RelationView.py +++ b/src/DataViews/_RelationView.py @@ -171,6 +171,9 @@ class RelationshipView(PageView.PersonNavView): self.change_person(None) def person_rebuild(self): + """Large change to person database""" + if self.active: + self.bookmarks.redraw() if self.dbstate.active: while not self.change_person(self.dbstate.active.handle): pass diff --git a/src/DataViews/_RepositoryView.py b/src/DataViews/_RepositoryView.py index 8ec026d54..219544e89 100644 --- a/src/DataViews/_RepositoryView.py +++ b/src/DataViews/_RepositoryView.py @@ -91,7 +91,7 @@ class RepositoryView(PageView.ListView): 'repository-add' : self.row_add, 'repository-update' : self.row_update, 'repository-delete' : self.row_delete, - 'repository-rebuild' : self.build_tree, + 'repository-rebuild' : self.object_build, } self.func_list = { diff --git a/src/DataViews/_SourceView.py b/src/DataViews/_SourceView.py index 9e2944de1..ed425d4a9 100644 --- a/src/DataViews/_SourceView.py +++ b/src/DataViews/_SourceView.py @@ -84,7 +84,7 @@ class SourceView(PageView.ListView): 'source-add' : self.row_add, 'source-update' : self.row_update, 'source-delete' : self.row_delete, - 'source-rebuild' : self.build_tree, + 'source-rebuild' : self.object_build, } self.func_list = { diff --git a/src/PageView.py b/src/PageView.py index a81592b30..e3a8a9734 100644 --- a/src/PageView.py +++ b/src/PageView.py @@ -638,14 +638,13 @@ class ListView(BookMarkView): self.search_bar.setup_filter(cols) def goto_handle(self, handle): - if not self.dbstate.active or self.inactive: + if not handle or self.inactive: return - # mark inactive to prevent recusion + # mark inactive to prevent recursion self.inactive = True - # select the active person in the person view - + # select the handle in the view try: path = self.model.on_get_path(handle) self.selection.unselect_all() @@ -729,7 +728,14 @@ class ListView(BookMarkView): self.dirty = False else: self.dirty = True - + + def object_build(self): + """callback, for if tree must be rebuild and bookmarks redrawn + """ + self.build_tree() + if self.active: + self.bookmarks.redraw() + def filter_toggle_action(self,obj): if obj.get_active(): self.search_bar.hide()