Fix initial sort value
svn: r1020
This commit is contained in:
parent
305917f9b3
commit
b7a0b76edc
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user