Commits

Yuya Nishihara  committed cd0980d

status: delete old WctxModel on refreshWctx

  • Participants
  • Parent commits 9768bef
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/status.py

         if self.checkable:
             tm.checkToggled.connect(self.updateCheckCount)
 
+        oldtm = self.tv.model()
         self.tv.setModel(tm)
+        if oldtm:
+            oldtm.deleteLater()
         self.tv.setSortingEnabled(True)
         self.tv.setColumnHidden(COL_PATH, bool(wctx.p2()) or not self.checkable)
         self.tv.setColumnHidden(COL_MERGE_STATE, not tm.anyMerge())