From 96832a51857dd7a1ec9f01b49986f2370c2dafd0 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 21 Dec 2015 10:39:36 -0500 Subject: [PATCH] Fix build error cause by previous commit when KICAD_SCRIPTING_WXPYTHON is not enabled. --- include/wxPcbStruct.h | 4 ++++ pcbnew/pcbframe.cpp | 6 ++++++ pcbnew/pcbnew.cpp | 2 +- pcbnew/toolbars_update_user_interface.cpp | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 8fcd89ac4b..82751702d8 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -1552,6 +1552,8 @@ public: // Autoplacement: void OnPlaceOrRouteFootprints( wxCommandEvent& event ); +#if defined( KICAD_SCRIPTING_WXPYTHON ) + /** * Function ScriptingConsoleEnableDisable * enables or disabled the scripting console @@ -1560,6 +1562,8 @@ public: void OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent ); +#endif + void OnSelectAutoPlaceMode( wxCommandEvent& aEvent ); /** diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 0d641e5c02..3b18d398e9 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -207,10 +207,12 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnSelectAutoPlaceMode ) EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool ) +#if defined( KICAD_SCRIPTING_WXPYTHON ) // has meaning only with KICAD_SCRIPTING_WXPYTHON enabled EVT_TOOL( ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, PCB_EDIT_FRAME::ScriptingConsoleEnableDisable ) EVT_UPDATE_UI( ID_TOOLBARH_PCB_SCRIPTING_CONSOLE, PCB_EDIT_FRAME::OnUpdateScriptingConsoleState ) +#endif // Option toolbar EVT_TOOL( ID_TB_OPTIONS_DRC_OFF, @@ -982,6 +984,8 @@ void PCB_EDIT_FRAME::UpdateTitle() } +#if defined( KICAD_SCRIPTING_WXPYTHON ) + void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) { @@ -996,6 +1000,8 @@ void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent ) pythonPanelFrame->Show( pythonPanelShown ); } +#endif + void PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent ) { diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 2277c654d7..cbac2a5732 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -369,7 +369,7 @@ void IFACE::OnKifaceEnd() { end_common(); -#if KICAD_SCRIPTING_WXPYTHON +#if defined( KICAD_SCRIPTING_WXPYTHON ) // Restore the thread state and tell Python to cleanup after itself. // wxPython will do its own cleanup as part of that process. // This should only be called if python was setup correctly. diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index 8bd2aaf845..693eb93223 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -104,6 +104,9 @@ void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent ) m_SelLayerBox->SetLayerSelection( GetActiveLayer() ); } + +#if defined( KICAD_SCRIPTING_WXPYTHON ) + // Used only when the DKICAD_SCRIPTING_WXPYTHON option is on void PCB_EDIT_FRAME::OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent ) { @@ -112,6 +115,8 @@ void PCB_EDIT_FRAME::OnUpdateScriptingConsoleState( wxUpdateUIEvent& aEvent ) aEvent.Check( pythonPanelShown ); } +#endif + void PCB_EDIT_FRAME::OnUpdateZoneDisplayStyle( wxUpdateUIEvent& aEvent ) {