Source

thg-qt-mq / repoview-selecte.diff

Full commit
# HG changeset patch
# Parent ebc688d14817f5fa0fa9da014929d813a557096e
diff --git a/tortoisehg/hgqt/repoview.py b/tortoisehg/hgqt/repoview.py
--- a/tortoisehg/hgqt/repoview.py
+++ b/tortoisehg/hgqt/repoview.py
@@ -215,13 +215,15 @@ class HgRepoView(QTableView):
 
     def onRowChange(self, index, index_from):
         rev = self.revFromindex(index)
-        if self.current_rev != rev and not self._in_history:
+        changed = self.current_rev != rev
+        if changed and not self._in_history:
             del self._rev_history[self._rev_pos+1:]
             self._rev_history.append(rev)
             self._rev_pos = len(self._rev_history)-1
         self._in_history = False
         self.current_rev = rev
-        self.revisionSelected.emit(rev)
+        if changed:
+            self.revisionSelected.emit(rev)
 
     def selectedRevisions(self):
         """Return the list of selected revisions"""