void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { wxWindow * pythonPanelFrame = findPythonConsole(); bool pythonPanelShown = true; if( pythonPanelFrame == NULL ) pythonPanelFrame = new PYTHON_CONSOLE_FRAME( this, pythonConsoleNameId() ); else pythonPanelShown = ! pythonPanelFrame->IsShown(); pythonPanelFrame->Show( pythonPanelShown ); }
void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { wxWindow * pythonPanelFrame = findPythonConsole(); bool pythonPanelShown = true; if( pythonPanelFrame == NULL ) pythonPanelFrame = CreatePythonShellWindow( this, pythonConsoleNameId() ); else pythonPanelShown = ! pythonPanelFrame->IsShown(); if( pythonPanelFrame ) pythonPanelFrame->Show( pythonPanelShown ); else wxMessageBox( wxT( "Error: unable to create the Python Console" ) ); }