Commits

Henrik Stuart committed fd95707

history: do not undo common ancestor selection by context menu logic

Comments (0)

Files changed (1)

tortoisehg/hgtk/history.py

 
     def restore_single_sel(self, widget, *args):
         self.tree.get_selection().set_mode(gtk.SELECTION_SINGLE)
-        self.tree.get_selection().select_path(self.origsel)
+        if self.origsel:
+            self.tree.get_selection().select_path(self.origsel)
         self.revrange = None
 
     def tree_diff_context_menu(self):
         ancestor = changelog.ancestor(lookup(rev1), lookup(rev2))
         rev = changelog.rev(ancestor)
         self.goto_rev(rev)
+        self.origsel = None
 
     def thgrefresh(self, window):
         self.reload_log()