← Back to team overview

kicad-developers team mailing list archive

[PATCH] Do not show footprint wizard menue entry when scripting is disabled

 

Hi,

while poking around the code I apparently found some missing #ifdef
statements.

Regards, Thomas
From 41dc18ac5c96313a465c2b721dc756bb7a2be79b Mon Sep 17 00:00:00 2001
From: Thomas Pointhuber <thomas.pointhuber@xxxxxx>
Date: Sat, 25 Aug 2018 18:30:34 +0200
Subject: [PATCH] Do not show footprint wizard menu when scripting is disabled

---
 pcbnew/footprint_tree_pane.cpp      | 2 ++
 pcbnew/menubar_footprint_editor.cpp | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/pcbnew/footprint_tree_pane.cpp b/pcbnew/footprint_tree_pane.cpp
index dd8d92309..f6e124e83 100644
--- a/pcbnew/footprint_tree_pane.cpp
+++ b/pcbnew/footprint_tree_pane.cpp
@@ -66,8 +66,10 @@ FOOTPRINT_TREE_PANE::FOOTPRINT_TREE_PANE( FOOTPRINT_EDIT_FRAME* aParent )
     menuLibrary->AppendSeparator();
     AddMenuItem( menuLibrary.get(), ID_MODEDIT_NEW_MODULE, _( "New &Footprint..." ),
                  KiBitmap( new_component_xpm ) );
+#ifdef KICAD_SCRIPTING
     AddMenuItem( menuLibrary.get(), ID_MODEDIT_NEW_MODULE_FROM_WIZARD, _( "&Create Footprint..." ),
                  KiBitmap( new_component_xpm ) );
+#endif
     AddMenuItem( menuLibrary.get(), ID_MODEDIT_IMPORT_PART, _( "&Import Footprint..." ),
                  KiBitmap( import_part_xpm ) );
 
diff --git a/pcbnew/menubar_footprint_editor.cpp b/pcbnew/menubar_footprint_editor.cpp
index 8ce386500..0e80039a3 100644
--- a/pcbnew/menubar_footprint_editor.cpp
+++ b/pcbnew/menubar_footprint_editor.cpp
@@ -70,10 +70,12 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
                  text, _( "Create a new footprint" ),
                  KiBitmap( new_footprint_xpm ) );
 
+#ifdef KICAD_SCRIPTING
     AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE_FROM_WIZARD,
                  _( "&Create Footprint..." ),
                  _( "Create a new footprint using the footprint wizard" ),
                  KiBitmap( module_wizard_xpm ) );
+#endif
 
     fileMenu->AppendSeparator();
 
-- 
2.18.0

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups