Fix bug where handle column not defined consistently between view and model

svn: r14197
This commit is contained in:
Nick Hall 2010-02-03 16:33:12 +00:00
parent be4e299638
commit 03b41ff8fb
2 changed files with 13 additions and 7 deletions

View File

@ -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)

View File

@ -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):