* src/gramps_main.py: update family view after a GEDCOM import

* src/plugins/TimeLine.py: draw grid after displaying text. Fixes
a problem with OpenOffice


svn: r2117
This commit is contained in:
Don Allingham 2003-09-12 03:17:42 +00:00
parent 2289aadd29
commit a45dfa269a
2 changed files with 13 additions and 6 deletions

View File

@ -1053,6 +1053,9 @@ class Gramps:
def import_tool_callback(self): def import_tool_callback(self):
Utils.modified() Utils.modified()
self.clear_person_tabs() self.clear_person_tabs()
if not self.active_person:
self.change_active_person(self.find_initial_person())
self.goto_active_person()
self.full_update() self.full_update()
def full_update(self): def full_update(self):
@ -2056,17 +2059,20 @@ class Gramps:
self.statusbar.set_progress_percentage(1.0) self.statusbar.set_progress_percentage(1.0)
self.change_active_person(self.find_initial_person())
self.full_update()
self.statusbar.set_progress_percentage(0.0)
return 1
def find_initial_person(self):
person = self.db.getDefaultPerson() person = self.db.getDefaultPerson()
if not person: if not person:
the_ids = self.db.getPersonMap().keys() the_ids = self.db.getPersonMap().keys()
if the_ids: if the_ids:
the_ids.sort() the_ids.sort()
person = self.db.getPerson(the_ids[0]) person = self.db.getPerson(the_ids[0])
self.change_active_person(person) return person
self.full_update()
self.statusbar.set_progress_percentage(0.0)
return 1
def load_database(self,name): def load_database(self,name):

View File

@ -172,7 +172,6 @@ class TimeLine:
if self.newpage: if self.newpage:
self.d.page_break() self.d.page_break()
self.d.start_page() self.d.start_page()
self.build_grid(low,high,start,stop)
index = 1 index = 1
current = 1; current = 1;
@ -215,6 +214,7 @@ class TimeLine:
if (y2 + incr) >= self.d.get_usable_height(): if (y2 + incr) >= self.d.get_usable_height():
if current != length: if current != length:
self.build_grid(low,high,start,stop)
self.d.end_page() self.d.end_page()
self.d.start_page() self.d.start_page()
self.build_grid(low,high,start,stop) self.build_grid(low,high,start,stop)
@ -224,6 +224,7 @@ class TimeLine:
index += 1; index += 1;
current += 1 current += 1
self.build_grid(low,high,start,stop)
self.d.end_page() self.d.end_page()
if self.standalone: if self.standalone:
self.d.close() self.d.close()