1. xpol
  2. thg

Commits

Yuya Nishihara  committed 3634696

reporegistry: destroy old model on reloadModel()

  • Participants
  • Parent commits 554ec5d
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/reporegistry.py

View file
  • Ignore whitespace
             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