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

workbench: more robust column update after re-order

When you re-order or change columns, we do not need to reload the
graph but we do need to update the model and reset its cache. This
avoids a race between reload() and resizeColumns().

This also required backing out a change Adrian just made, else the
last column is made the largest even when it should have a fixed size.

Changeset f12c176aff61

Parent d15d8a3357c5

by Steve Borho

Changes to 3 files · Browse files at f12c176aff61 Showing diff from parent d15d8a3357c5 Diff from another changeset...

 
175
176
177
178
179
 
 
180
 
181
182
183
 
175
176
177
 
 
178
179
180
181
182
183
184
@@ -175,9 +175,10 @@
  s = QSettings()   cols = s.value('workbench/columns').toStringList()   cols = [str(col) for col in cols] - if cols: - validcols = [col for col in cols if col in ALLCOLUMNS] + validcols = [col for col in cols if col in ALLCOLUMNS] + if validcols:   self._columns = tuple(validcols) + self.datacache = {}   self.emit(SIGNAL("layoutChanged()"))     def branch(self):
 
213
214
215
216
 
217
218
219
 
213
214
215
 
216
217
218
219
@@ -213,7 +213,7 @@
  if model._columns[c] in model._stretchs:   w = model._stretchs[model._columns[c]] / tot_stretch   self.setColumnWidth(c, col1_width * w) - self.horizontalHeader().setStretchLastSection(True) + #self.horizontalHeader().setStretchLastSection(True)     def revFromindex(self, index):   if not index.isValid():
 
507
508
509
510
511
 
512
513
514
 
507
508
509
 
510
511
512
513
514
@@ -507,8 +507,8 @@
  """Display the column selection dialog"""   dlg = ColumnSelectDialog(repomodel.ALLCOLUMNS)   if dlg.exec_() == QDialog.Accepted: - self.reload()   w = self.repoTabsWidget.currentWidget() + w.repoview.model().updateColumns()   w.repoview.resizeColumns()     def back(self):