Commits

Daniel Atallah committed 5aba622

workbench: dispose of the RepoWidget when removing the tab

QTabWidget.removeTab() only removes the page - it doesn't dispose of it. It
doesn't seem like there would be any remaining references to the removed
RepoWidget except internally, but apparently the right thing to do is to call
"deleteLater()" manually.

Comments (0)

Files changed (1)

tortoisehg/hgqt/workbench.py

         index = self.repoTabsWidget.currentIndex()
         if widget.closeRepoWidget():
             self.repoTabsWidget.removeTab(index)
+            widget.deleteLater()
             self.updateMenu()
 
     def repoTabCloseRequested(self, index):
         w = tw.widget(index)
         if w and w.closeRepoWidget():
             tw.removeTab(index)
+            w.deleteLater()
             self.updateMenu()
 
     def repoTabChanged(self, index=0):