Pcbnew: Fix an assert in debug mode, and fix a minor issue in menubar

This commit is contained in:
jean-pierre charras 2017-02-26 11:47:15 +01:00
parent 94bef6abd2
commit 1001442a48
5 changed files with 12 additions and 12 deletions

View File

@ -125,12 +125,12 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
preparePreferencesMenu( configmenu );
// Update menu labels:
configmenu->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
configmenu->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER,
m_show_layer_manager_tools ?
_( "Hide La&yers Manager" ) : _("Show La&yers Manager" ) );
configmenu->SetLabel( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
m_show_layer_manager_tools ?
_( "Hide Microwa&ve Toolbar" ): _( "Show Microwave Toolbar" ) );
m_show_microwave_tools ?
_( "Hide Microwa&ve Toolbar" ): _( "Show Microwa&ve Toolbar" ) );
//--- dimensions submenu ------------------------------------------------------
@ -192,13 +192,13 @@ void prepareDesignRulesMenu( wxMenu* aParentMenu )
// Build the preferences menu
void preparePreferencesMenu( wxMenu* aParentMenu )
{
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
wxEmptyString, // The actual label will be set later
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER,
_( "Hide La&yers Manager" ),
HELP_SHOW_HIDE_LAYERMANAGER,
KiBitmap( layers_manager_xpm ) );
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
wxEmptyString, // The actual label will be set later
_( "Hide Microwa&ve Toolbar" ),
HELP_SHOW_HIDE_MICROWAVE_TOOLS,
KiBitmap( mw_toolbar_xpm ) );
#ifdef __WXMAC__

View File

@ -153,7 +153,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
EVT_MENU( ID_CONFIG_READ, PCB_EDIT_FRAME::Process_Config )
EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END,
PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG, PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER, PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR, PCB_EDIT_FRAME::Process_Config )
EVT_MENU( wxID_PREFERENCES, PCB_EDIT_FRAME::Process_Config )
EVT_MENU( ID_PCB_LAYERS_SETUP, PCB_EDIT_FRAME::Process_Config )

View File

@ -70,12 +70,12 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
switch( id )
{
case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG:
case ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER:
m_show_layer_manager_tools = ! m_show_layer_manager_tools;
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
m_auimgr.Update();
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER,
m_show_layer_manager_tools ?
_("Hide &Layers Manager" ) : _("Show &Layers Manager" ));
break;

View File

@ -304,7 +304,7 @@ enum pcbnew_ids
ID_PCB_3DSHAPELIB_WIZARD,
ID_PCB_LIB_TABLE_EDIT,
ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER,
ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,

View File

@ -792,7 +792,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
m_show_microwave_tools ?
_( "Hide Microwave Toolbar" ): _( "Show Microwave Toolbar" ));
_( "Hide Microwa&ve Toolbar" ): _( "Show Microwa&ve Toolbar" ));
break;
case ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR:
@ -801,7 +801,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
m_auimgr.Update();
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER,
m_show_layer_manager_tools ?
_( "Hide &Layers Manager" ) : _( "Show &Layers Manager" ) );
break;