Yuya Nishihara committed 3fba499

filedialogs: do not override goto-ed revision on modelFilled

If the revision to goto() is already loaded, goto() changes the current
index immediately and does not set `self._show_rev`. So the current row is
reset to tipmost revision by the following modelFilled(). Thus, goto(rev)
has no effect.

modelFilled() shouldn't change the current index in this case.

Comments (0)

Files changed (1)


         if self._show_rev is not None:
             index = self.filerevmodel.indexFromRev(self._show_rev)
             self._show_rev = None
+        elif self.repoview.currentIndex().isValid():
+            return  # already set by goto()
             index = self.filerevmodel.index(0,0)
         if index is not None:
         if self._show_rev is not None:
             self._show_rev = None
+        elif self.tableView_revisions_left.currentIndex().isValid():
+            return  # already set by goto()
         elif len(self.filerevmodel.graph):