Commits

Yuya Nishihara committed 3634696

reporegistry: destroy old model on reloadModel()

Comments (0)

Files changed (1)

tortoisehg/hgqt/reporegistry.py

             QTimer.singleShot(1000 * UPDATE_DELAY, self.reloadModel)
 
     def reloadModel(self):
+        oldmodel = self.tview.model()
         self.tview.setModel(
             repotreemodel.RepoTreeModel(settingsfilename(), self,
                 self.showSubrepos, self.showNetworkSubrepos,
                 self.showShortPaths))
+        oldmodel.deleteLater()
         self.expand()
         self._pendingReloadModel = False