Commit 2f5e23be authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Prevent closing event in the MDI area

parent 045a3337
......@@ -1952,7 +1952,9 @@ class OG_MainWindow(QtGui.QMainWindow, object):
self.mdi_area = self.findChild(QtGui.QMdiArea, 'mdiArea')
self.sub_mdi = self.mdi_area.subWindowList()
self.filter_event = FilterEvent()
for each in self.sub_mdi:
if each.widget() != process_widget:
self.statechart_mdi = each
......@@ -2105,6 +2107,15 @@ class OG_MainWindow(QtGui.QMainWindow, object):
LOG.debug('Bye bye!')
super(OG_MainWindow, self).closeEvent(event)
class FilterEvent(QtCore.QObject):
def eventFilter(self, obj, event):
''' Used to intercept the close event sent of the Mdi windows '''
if event.type() == QtCore.QEvent.Close:
return True
return QtCore.QObject.eventFilter(self, obj, event)
def parse_args():
''' Parse command line arguments '''
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment