From 03b41ff8fb6e539eb37278d3e59738e497c81771 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Wed, 3 Feb 2010 16:33:12 +0000 Subject: [PATCH] Fix bug where handle column not defined consistently between view and model svn: r14197 --- src/gui/viewmanager.py | 8 +++++++- src/gui/views/treemodels/peoplemodel.py | 12 ++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index 0bdc3ad12..c941082bb 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -79,6 +79,7 @@ from gui.configure import GrampsPreferences from gen.db.backup import backup from gen.db.exceptions import DbException from GrampsAboutDialog import GrampsAboutDialog +from workspace import Workspace #------------------------------------------------------------------------- # @@ -930,7 +931,12 @@ class ViewManager(CLIManager): page_display = page.get_display() page_display.show_all() page.post() - page_no = self.notebook_cat[-1].append_page(page_display, + + # create a workspace and add the view to it + ws = Workspace() + ws.add_view(page_display) + + page_no = self.notebook_cat[-1].append_page(ws.get_display(), gtk.Label(page_title)) self.pages[-1].append(page) pageid = (pdata.id + '_%i' % nrpage) diff --git a/src/gui/views/treemodels/peoplemodel.py b/src/gui/views/treemodels/peoplemodel.py index 459c5a42e..cb598d5f0 100644 --- a/src/gui/views/treemodels/peoplemodel.py +++ b/src/gui/views/treemodels/peoplemodel.py @@ -117,10 +117,10 @@ class PeopleBaseModel(object): self.column_death_place, self.column_spouse, self.column_change, + self.column_int_id, self.column_marker_text, self.column_marker_color, self.column_tooltip, - self.column_int_id, ] self.smap = [ self.sort_name, @@ -132,10 +132,10 @@ class PeopleBaseModel(object): self.column_death_place, self.column_spouse, self.column_change, + self.column_int_id, self.column_marker_text, self.column_marker_color, self.column_tooltip, - self.column_int_id, ] #columns are accessed on every mouse over, so it is worthwhile to @@ -448,7 +448,7 @@ class PersonListModel(PeopleBaseModel, FlatBaseModel): PeopleBaseModel.__init__(self, db) FlatBaseModel.__init__(self, db, search=search, skip=skip, - tooltip_column=11, + tooltip_column=12, scol=scol, order=order, sort_map=sort_map) def clear_cache(self, handle=None): @@ -459,7 +459,7 @@ class PersonListModel(PeopleBaseModel, FlatBaseModel): """ Return the column for marker colour. """ - return 10 + return 11 class PersonTreeModel(PeopleBaseModel, TreeBaseModel): """ @@ -469,8 +469,8 @@ class PersonTreeModel(PeopleBaseModel, TreeBaseModel): skip=set(), sort_map=None): PeopleBaseModel.__init__(self, db) - TreeBaseModel.__init__(self, db, 11, search=search, skip=skip, - marker_column=10, + TreeBaseModel.__init__(self, db, 12, search=search, skip=skip, + marker_column=11, scol=scol, order=order, sort_map=sort_map) def _set_base_data(self):