Changeset 7451b88 in sasview


Ignore:
Timestamp:
Oct 7, 2016 4:41:12 PM (5 years ago)
Author:
davidm
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
d813cad8
Parents:
97f05432
git-author:
David Mannicke <david.mannicke@…> (10/07/16 16:16:42)
git-committer:
David Mannicke <david.mannicke@…> (10/07/16 16:41:12)
Message:

cancelling the Quit dialog will now prevent the MainWindow? from closing

Location:
src/sas/qtgui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/GuiManager.py

    r630155bd r7451b88  
    238238        reply = QtGui.QMessageBox.question( 
    239239            self._parent, 
    240             'Warning', 
     240            'Information', 
    241241            quit_msg, 
    242242            QtGui.QMessageBox.Yes, 
    243243            QtGui.QMessageBox.No) 
    244244 
    245         if reply == QtGui.QMessageBox.No: 
    246             return 
    247  
    248245        # Exit if yes 
    249         reactor.callFromThread(reactor.stop) 
     246        if reply == QtGui.QMessageBox.Yes: 
     247            reactor.callFromThread(reactor.stop) 
     248            return True 
     249 
     250        return False 
    250251 
    251252    def checkUpdate(self): 
  • src/sas/qtgui/MainWindow.py

    r2366fb2 r7451b88  
    6565 
    6666    def closeEvent(self, event): 
    67         self.guiManager.quitApplication() 
     67        if self.guiManager.quitApplication(): 
     68            event.accept() 
     69        else: 
     70            event.ignore() 
    6871 
    6972 
Note: See TracChangeset for help on using the changeset viewer.