Yuya Nishihara avatar Yuya Nishihara committed 3b93729

reporegistory: restore original behavior of setActiveTabRepo('') (fixes #2279)

Backed out changeset f06d377cc564.

setActiveTabRepo(''), which is called when all repos are closed, should switch
off the current active flag.

Comments (0)

Files changed (1)

tortoisehg/hgqt/reporegistry.py

                 self.showShortPaths))
         oldmodel.deleteLater()
         self.expand()
-        self.setActiveTabRepo()
         self._pendingReloadModel = False
 
     def _getItemAndAncestors(self, it):
             m.addRepo(group, root, -1)
             self.updateSettingsFile()
 
-    def setActiveTabRepo(self, root=None):
+    def setActiveTabRepo(self, root):
         """"
         The selected tab has changed on the workbench
         Unmark the previously selected tab and mark the new one as selected on
         the Repo Registry as well
         """
-        it = None
-        if root:
-            root = hglib.fromunicode(root)
-            if self._activeTabRepo:
-                self._activeTabRepo.setActive(False)
-            m = self.tview.model()
-            it = m.getRepoItem(root, lookForSubrepos=True)
-        elif self._activeTabRepo:
-            it = self._activeTabRepo
+        root = hglib.fromunicode(root)
+        if self._activeTabRepo:
+            self._activeTabRepo.setActive(False)
+        m = self.tview.model()
+        it = m.getRepoItem(root, lookForSubrepos=True)
         if it:
             self._activeTabRepo = it
             it.setActive(True)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.