Commits

Yuya Nishihara committed 9768bef

repowidget: delete old HgRepoListModel on reload (refs #2119, #702)

Comments (0)

Files changed (1)

tortoisehg/hgqt/repowidget.py

         self.repomodel.filled.connect(self.modelFilled)
         self.repomodel.loaded.connect(self.modelLoaded)
         self.repomodel.showMessage.connect(self.showMessage)
+        oldmodel = self.repoview.model()
         self.repoview.setModel(self.repomodel)
+        if oldmodel:
+            oldmodel.deleteLater()
         try:
             self._last_series = self.repo.mq.series[:]
         except AttributeError: