Ensure Tools->External plugins is populated

Since the commit e8b11c911e, 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.
This commit is contained in:
Jean-Samuel Reynaud 2020-09-11 03:04:27 +00:00 committed by Seth Hillbrand
parent fc1665ff28
commit d6322dcf0d
1 changed files with 3 additions and 4 deletions

View File

@ -418,6 +418,9 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
ID_TOOLBARH_PCB_ACTION_PLUGIN_SHOW_FOLDER, ID_TOOLBARH_PCB_ACTION_PLUGIN_SHOW_FOLDER,
folder_xpm ); folder_xpm );
#endif #endif
// Populate the Action Plugin sub-menu: Must be done before Add
// Since the object is cloned by Add
buildActionPluginMenus( submenuActionPlugins );
submenuActionPlugins->AppendSeparator(); submenuActionPlugins->AppendSeparator();
toolsMenu->AppendSeparator(); toolsMenu->AppendSeparator();
@ -468,8 +471,4 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
SetMenuBar( menuBar ); SetMenuBar( menuBar );
delete oldMenuBar; delete oldMenuBar;
#if defined(KICAD_SCRIPTING) && defined(KICAD_SCRIPTING_ACTION_MENU)
// Populate the Action Plugin sub-menu
buildActionPluginMenus( submenuActionPlugins );
#endif
} }