From d6322dcf0d105ce98f6fbea1b2a020f8f197af70 Mon Sep 17 00:00:00 2001 From: Jean-Samuel Reynaud Date: Fri, 11 Sep 2020 03:04:27 +0000 Subject: [PATCH] Ensure Tools->External plugins is populated Since the commit e8b11c911e7f8777a3f8891545b6ca827c785300, the menu tools->external plugins is empty. This is because on new system, an added submenu is cloned when added. So any update on the object after Add it as no effect. The menu stay empty. With this commit the menu filling is made before adding submenu. --- pcbnew/menubar_pcb_editor.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pcbnew/menubar_pcb_editor.cpp b/pcbnew/menubar_pcb_editor.cpp index 80b8ee5ef7..1438bc8062 100644 --- a/pcbnew/menubar_pcb_editor.cpp +++ b/pcbnew/menubar_pcb_editor.cpp @@ -418,6 +418,9 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() ID_TOOLBARH_PCB_ACTION_PLUGIN_SHOW_FOLDER, folder_xpm ); #endif + // Populate the Action Plugin sub-menu: Must be done before Add + // Since the object is cloned by Add + buildActionPluginMenus( submenuActionPlugins ); submenuActionPlugins->AppendSeparator(); toolsMenu->AppendSeparator(); @@ -468,8 +471,4 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() SetMenuBar( menuBar ); delete oldMenuBar; -#if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU) - // Populate the Action Plugin sub-menu - buildActionPluginMenus( submenuActionPlugins ); -#endif }