From b7a0b76edc6ed01aa8de062ca1ac9c1bca492334 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 1 Jun 2002 04:18:30 +0000 Subject: [PATCH] Fix initial sort value svn: r1020 --- gramps/src/Sorter.py | 16 +++++++++------- gramps/src/gramps_main.py | 9 +++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/gramps/src/Sorter.py b/gramps/src/Sorter.py index de4f6d812..e5978c16c 100644 --- a/gramps/src/Sorter.py +++ b/gramps/src/Sorter.py @@ -41,8 +41,8 @@ class Sorter: self.column_map = column_map self.key = key self.top_window = top_window - (self.col,self.sort) = GrampsCfg.get_sort_cols(self.key,0,GTK.SORT_DESCENDING) - self.change_sort(0) + (self.col,self.sort) = GrampsCfg.get_sort_cols(self.key,0,GTK.SORT_ASCENDING) + self.change_sort(self.col,0) self.clist.connect('click-column',self.click) def sort_col(self): @@ -86,16 +86,12 @@ class Sorter: (sort_col,arrow) = self.column_map[column] except: return + for (i,a) in self.column_map: if arrow != a: a.hide() arrow.show() - self.clist.set_sort_column(sort_col) - self.clist.set_sort_type(self.sort) - - self.sort_list() - if change: if self.col == column: if self.sort == GTK.SORT_DESCENDING: @@ -107,6 +103,12 @@ class Sorter: else: self.sort = GTK.SORT_ASCENDING arrow.set(GTK.ARROW_DOWN,2) + + self.clist.set_sort_column(sort_col) + self.clist.set_sort_type(self.sort) + + self.sort_list() + self.col = column if len(self.clist.selection) > 1: diff --git a/gramps/src/gramps_main.py b/gramps/src/gramps_main.py index a81e38f40..bd813c13e 100755 --- a/gramps/src/gramps_main.py +++ b/gramps/src/gramps_main.py @@ -1630,12 +1630,17 @@ class Gramps: GrampsCfg.save_last_file(name) self.gtop.get_widget("filter").set_text("") + self.statusbar.set_progress(1.0) + self.full_update() + person = self.db.getDefaultPerson() if person: self.active_person = person + elif self.person_list.rows > 0: + id = self.person_list.get_row_data(0) + self.active_person = self.db.getPerson(id) - self.statusbar.set_progress(1.0) - self.full_update() + self.goto_active_person() self.statusbar.set_progress(0.0) return 1