Commits

Yuya Nishihara committed 061c0f0

filedialogs: emit finished on close like other dialogs

  • Participants
  • Parent commits fcea9c8
  • Branches stable

Comments (0)

Files changed (1)

tortoisehg/hgqt/filedialogs.py

 otherside = {'left': 'right', 'right': 'left'}
 
 class _AbstractFileDialog(QMainWindow):
+    finished = pyqtSignal(int)
+
     def __init__(self, repo, filename, repoviewer=None):
         QMainWindow.__init__(self)
         self.repo = repo
         self.setupViews()
         self.setupModels()
 
+    def closeEvent(self, event):
+        super(_AbstractFileDialog, self).closeEvent(event)
+        self.finished.emit(0)  # mimic QDialog exit
+
     def setRepoViewer(self, repoviewer=None):
         self.repoviewer = repoviewer
         if repoviewer: