def closeEvent(self, event):
        reply = QtGui.QMessageBox.question(self, 'Save before Exit?', "Save the Project before quitting the Application", QtGui.QMessageBox.Yes, QtGui.QMessageBox.No, QtGui.QMessageBox.Cancel)
        if reply == QtGui.QMessageBox.Yes:
            self.saveProject()
            event.accept()
            if self.labelWidget.grid:
                self.labelWidget.grid.deleteUndocked()
        elif reply == QtGui.QMessageBox.No:
            event.accept()
            if hasattr(self.labelWidget,'grid') or self.labelWidget.grid:
                self.labelWidget.grid.deleteUndocked()
        else:
            event.ignore()
           

#*******************************************************************************
# i f   _ _ n a m e _ _   = =   " _ _ m a i n _ _ "                            *
#*******************************************************************************
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/ilastikMain.py/MainWindow.closeEvent/operator `and` -> `or`