From a3c02d8d534e8037ba0523ac8a4e2abde2288efa 2011-10-26 18:42:42 From: Jens H. Nielsen Date: 2011-10-26 18:42:42 Subject: [PATCH] Make cancel in the close dialog behave right. Triggers event.ignore() when canceling --- diff --git a/IPython/frontend/qt/console/mainwindow.py b/IPython/frontend/qt/console/mainwindow.py index 8a8cbf4..34a3e5e 100644 --- a/IPython/frontend/qt/console/mainwindow.py +++ b/IPython/frontend/qt/console/mainwindow.py @@ -835,6 +835,7 @@ class MainWindow(QtGui.QMainWindow): reply = okay if reply == cancel: + event.ignore() return if reply == okay: while self.tab_widget.count() >= 1: @@ -842,6 +843,5 @@ class MainWindow(QtGui.QMainWindow): widget = self.active_frontend widget._confirm_exit = False self.close_tab(widget) - - event.accept() + event.accept()