def OnPaneClose(self, event):
        # don't do anything if a panel is being minimized
        if event.GetEventType() == aui.wxEVT_AUI_PANE_MINIMIZE:
            return

        windows = [event.pane.window]
        if event.pane.IsNotebookControl():
            windows = list(event.pane.window.Children)

        for window in windows:
            if window == self._properties:
                self._properties = None
                self.GetMenuBar().Check(self.menu_ids["windows_properties"], False)
            elif window == self._code_viewer:
                self._code_viewer = None
                self.GetMenuBar().Check(self.menu_ids["windows_source"], False)
            elif window == self._value_viewer:
                self._value_viewer = None
                self.GetMenuBar().Check(self.menu_ids["windows_value"], False)
            elif window == self._dag_viewer:
                self._dag_viewer = None
            elif window == self._pycrust:
                self._pycrust = None
dataset/ETHPy150Open manahl/mdf/mdf/viewer/frame.py/MDFViewerFrame.OnPaneClose/original