Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

guess: make match treeview columns sortable

Changeset be5d3e5e56ee

Parent 6bc377a0bcf3

by Steve Borho

Changes to one file · Browse files at be5d3e5e56ee Showing diff from parent 6bc377a0bcf3 Diff from another changeset...

 
97
98
99
 
100
101
102
 
364
365
366
367
368
369
370
371
 
372
373
374
 
97
98
99
100
101
102
103
 
365
366
367
 
 
 
 
 
368
369
370
371
@@ -97,6 +97,7 @@
  matchtv.setItemsExpandable(False)   matchtv.setRootIsDecorated(False)   matchtv.setModel(MatchModel()) + matchtv.setSortingEnabled(True)   matchtv.clicked.connect(self.showDiff)   buthbox = QHBoxLayout()   matchbtn = QPushButton(_('Accept Selected Matches')) @@ -364,11 +365,7 @@
    def sort(self, col, order):   self.emit(SIGNAL("layoutAboutToBeChanged()")) - if col == COL_PATH: - c = self.checked - self.rows.sort(lambda x, y: cmp(c[x[col]], c[y[col]])) - else: - self.rows.sort(lambda x, y: cmp(x[col], y[col])) + self.rows.sort(lambda x, y: cmp(x[col], y[col]))   if order == Qt.DescendingOrder:   self.rows.reverse()   self.emit(SIGNAL("layoutChanged()"))