Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

history: fix logview row selection

Currently we use get_selected_rows, which among other things is problematic
when people move the cursor using ctrl + mouse click or arrow keys, and when
the user uses in-line searching. Either the selection is ignored, or, worse,
the selection is displayed inconsistently with the actually selected row
(since the selection lags behind the emit of the cursor-changed signal).

Since it's a single-selection treeview, we switch to using get_cursor instead.

Changeset 474766383f4e

Parent 5161ae409f55

by Sune Foldager

Changes to one file · Browse files at 474766383f4e Showing diff from parent 5161ae409f55 Diff from another changeset...

 
362
363
364
365
366
 
 
367
368
369
 
370
371
372
 
362
363
364
 
 
365
366
367
368
 
369
370
371
372
@@ -362,11 +362,11 @@
  def selection_changed(self, graphview):   'Graphview reports a new row selected'   treeview = graphview.treeview - (model, paths) = treeview.get_selection().get_selected_rows() - if not paths: + path, col = treeview.get_cursor() + if not path:   self.currevid = None   return False - self.currevid = graphview.get_revid_at_path(paths[0]) + self.currevid = graphview.get_revid_at_path(path)   self.ancestrybutton.set_sensitive(True)   if self.currevid != self.lastrevid:   self.lastrevid = self.currevid