Commits

Yuya Nishihara committed e22aca0

reporegistry: remove unused expand(item) case

Follows up f04669167fcf.

Comments (0)

Files changed (1)

tortoisehg/hgqt/reporegistry.py

             itchain.append(itchain[-1].parent())
         return reversed(itchain)
 
-    def expand(self, it=None):
-        if not it:
-            self.tview.expandToDepth(0)
-        else:
-            # Create a list of ancestors (including the selected item)
-            itchain = self._getItemAndAncestors(it)
-
-            # Starting from the topmost ancestor (a root item), expand the
-            # ancestors one by one
-            m = self.tview.model()
-            idx = self.tview.rootIndex()
-            for it in itchain:
-                idx = m.index(it.row(), 0, idx)
-                self.tview.expand(idx)
+    def expand(self):
+        self.tview.expandToDepth(0)
 
     def scrollTo(self, it=None, scrollHint=RepoTreeView.EnsureVisible):
         if not it: