1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Yuya Nishihara  committed c6a999a

filedialogs: connect setRepoViewer(None) without using lambda

It prevented the dialog from GC.

  • Participants
  • Parent commits 386c27a
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/filedialogs.py

View file
     def setRepoViewer(self, repoviewer=None):
         self.repoviewer = repoviewer
         if repoviewer:
-            repoviewer.finished.connect(lambda x: self.setRepoViewer(None))
+            repoviewer.finished.connect(self._clearRepoViewer)
+
+    @pyqtSlot()
+    def _clearRepoViewer(self):
+        self.setRepoViewer(None)
 
     def reload(self):
         'Reload toolbar action handler'