Pcbnew: Fix an assert in debug mode, and fix a minor issue in menubar
This commit is contained in:
parent
94bef6abd2
commit
1001442a48
|
@ -125,12 +125,12 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
||||||
preparePreferencesMenu( configmenu );
|
preparePreferencesMenu( configmenu );
|
||||||
|
|
||||||
// Update menu labels:
|
// 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 ?
|
m_show_layer_manager_tools ?
|
||||||
_( "Hide La&yers Manager" ) : _("Show La&yers Manager" ) );
|
_( "Hide La&yers Manager" ) : _("Show La&yers Manager" ) );
|
||||||
configmenu->SetLabel( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
|
configmenu->SetLabel( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
|
||||||
m_show_layer_manager_tools ?
|
m_show_microwave_tools ?
|
||||||
_( "Hide Microwa&ve Toolbar" ): _( "Show Microwave Toolbar" ) );
|
_( "Hide Microwa&ve Toolbar" ): _( "Show Microwa&ve Toolbar" ) );
|
||||||
|
|
||||||
|
|
||||||
//--- dimensions submenu ------------------------------------------------------
|
//--- dimensions submenu ------------------------------------------------------
|
||||||
|
@ -192,13 +192,13 @@ void prepareDesignRulesMenu( wxMenu* aParentMenu )
|
||||||
// Build the preferences menu
|
// Build the preferences menu
|
||||||
void preparePreferencesMenu( wxMenu* aParentMenu )
|
void preparePreferencesMenu( wxMenu* aParentMenu )
|
||||||
{
|
{
|
||||||
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER_DIALOG,
|
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_HIDE_LAYERS_MANAGER,
|
||||||
wxEmptyString, // The actual label will be set later
|
_( "Hide La&yers Manager" ),
|
||||||
HELP_SHOW_HIDE_LAYERMANAGER,
|
HELP_SHOW_HIDE_LAYERMANAGER,
|
||||||
KiBitmap( layers_manager_xpm ) );
|
KiBitmap( layers_manager_xpm ) );
|
||||||
|
|
||||||
AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
|
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,
|
HELP_SHOW_HIDE_MICROWAVE_TOOLS,
|
||||||
KiBitmap( mw_toolbar_xpm ) );
|
KiBitmap( mw_toolbar_xpm ) );
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
|
|
|
@ -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( ID_CONFIG_READ, PCB_EDIT_FRAME::Process_Config )
|
||||||
EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END,
|
EVT_MENU_RANGE( ID_PREFERENCES_HOTKEY_START, ID_PREFERENCES_HOTKEY_END,
|
||||||
PCB_EDIT_FRAME::Process_Config )
|
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( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR, PCB_EDIT_FRAME::Process_Config )
|
||||||
EVT_MENU( wxID_PREFERENCES, 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 )
|
EVT_MENU( ID_PCB_LAYERS_SETUP, PCB_EDIT_FRAME::Process_Config )
|
||||||
|
|
|
@ -70,12 +70,12 @@ void PCB_EDIT_FRAME::Process_Config( wxCommandEvent& event )
|
||||||
|
|
||||||
switch( id )
|
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_show_layer_manager_tools = ! m_show_layer_manager_tools;
|
||||||
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
|
m_auimgr.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
|
||||||
m_auimgr.Update();
|
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 ?
|
m_show_layer_manager_tools ?
|
||||||
_("Hide &Layers Manager" ) : _("Show &Layers Manager" ));
|
_("Hide &Layers Manager" ) : _("Show &Layers Manager" ));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -304,7 +304,7 @@ enum pcbnew_ids
|
||||||
ID_PCB_3DSHAPELIB_WIZARD,
|
ID_PCB_3DSHAPELIB_WIZARD,
|
||||||
ID_PCB_LIB_TABLE_EDIT,
|
ID_PCB_LIB_TABLE_EDIT,
|
||||||
ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
|
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_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
|
||||||
|
|
||||||
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
|
ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
|
||||||
|
|
|
@ -792,7 +792,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event )
|
||||||
|
|
||||||
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
|
GetMenuBar()->SetLabel( ID_MENU_PCB_SHOW_HIDE_MUWAVE_TOOLBAR,
|
||||||
m_show_microwave_tools ?
|
m_show_microwave_tools ?
|
||||||
_( "Hide Microwave Toolbar" ): _( "Show Microwave Toolbar" ));
|
_( "Hide Microwa&ve Toolbar" ): _( "Show Microwa&ve Toolbar" ));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR:
|
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.GetPane( wxT( "m_LayersManagerToolBar" ) ).Show( m_show_layer_manager_tools );
|
||||||
m_auimgr.Update();
|
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 ?
|
m_show_layer_manager_tools ?
|
||||||
_( "Hide &Layers Manager" ) : _( "Show &Layers Manager" ) );
|
_( "Hide &Layers Manager" ) : _( "Show &Layers Manager" ) );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue