diff --git a/src/gramps_main.py b/src/gramps_main.py index 852712ee0..2d4fc3c21 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -1053,6 +1053,9 @@ class Gramps: def import_tool_callback(self): Utils.modified() self.clear_person_tabs() + if not self.active_person: + self.change_active_person(self.find_initial_person()) + self.goto_active_person() self.full_update() def full_update(self): @@ -2056,17 +2059,20 @@ class Gramps: 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() if not person: the_ids = self.db.getPersonMap().keys() if the_ids: the_ids.sort() person = self.db.getPerson(the_ids[0]) - self.change_active_person(person) - - self.full_update() - self.statusbar.set_progress_percentage(0.0) - return 1 + return person def load_database(self,name): diff --git a/src/plugins/TimeLine.py b/src/plugins/TimeLine.py index 0635670db..3be534a86 100644 --- a/src/plugins/TimeLine.py +++ b/src/plugins/TimeLine.py @@ -172,7 +172,6 @@ class TimeLine: if self.newpage: self.d.page_break() self.d.start_page() - self.build_grid(low,high,start,stop) index = 1 current = 1; @@ -215,6 +214,7 @@ class TimeLine: if (y2 + incr) >= self.d.get_usable_height(): if current != length: + self.build_grid(low,high,start,stop) self.d.end_page() self.d.start_page() self.build_grid(low,high,start,stop) @@ -224,6 +224,7 @@ class TimeLine: index += 1; current += 1 + self.build_grid(low,high,start,stop) self.d.end_page() if self.standalone: self.d.close()