option to show/hide layer manager (default = show)

This commit is contained in:
charras 2010-01-22 12:55:29 +00:00
parent e00bbb8c7f
commit f41cc301f8
4 changed files with 849 additions and 764 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -254,6 +254,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
else
ll--;
SwitchLayer( DC, ll );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_NEXT:
@ -267,38 +268,50 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
else
ll++;
SwitchLayer( DC, ll );
// m_Layers->SelectLayer() must be called, but due to a problem in SetFocus() function
// that creates a lost of focus in main window (hotkeys not working after the first hotkey use)
// this call is commented until this issue is fixed.
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_COMPONENT:
SwitchLayer( DC, LAYER_N_FRONT );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_COPPER:
SwitchLayer( DC, LAYER_N_BACK );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_INNER1:
SwitchLayer( DC, LAYER_N_2 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_INNER2:
SwitchLayer( DC, LAYER_N_3 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_INNER3:
SwitchLayer( DC, LAYER_N_4 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_INNER4:
SwitchLayer( DC, LAYER_N_5 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_INNER5:
SwitchLayer( DC, LAYER_N_6 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_SWITCH_LAYER_TO_INNER6:
SwitchLayer( DC, LAYER_N_7 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break;
case HK_HELP: // Display Current hotkey list

View File

@ -24,8 +24,6 @@
#include "hotkeys.h"
#define MUWAVE_ENBL
#define SEL_LAYER_HELP _( \
"Show active layer selections\nand select layer pair for route and place via" )
@ -387,15 +385,19 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_DesignSettings.IsElementVisible( MOD_TEXT_INVISIBLE ));
#ifdef MUWAVE_ENBL
m_OptionsToolBar->AddSeparator();
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MANAGE_LAYERS_VERTICAL_TOOLBAR,
wxEmptyString,
wxBitmap( layers_manager_xpm ),
_(
"Show/hide the layers manager toolbar" ),
wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
wxEmptyString,
wxBitmap( mw_toolbar_xpm ),
_( "Display/remove auxiliary vertical toolbar (tools for micro wave applications)\n This is a experimental feature (under development)" ),
_( "Show/hide the toolbar for microwaves tools\n This is a experimental feature (under development)" ),
wxITEM_CHECK );
#endif
m_OptionsToolBar->Realize();
SetToolbars();
@ -746,6 +748,12 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
wxString msg = GetBoard()->GetLayerName( layer );
msg = AddHotkeyName( msg, s_Board_Editor_Hokeys_Descr,
HK_SwitchLayer[layer] );
/* we are using tabs in AddHotkeyName message.
* this is not handled by m_SelLayerBox.
* so we replace them by 3 spaces
*/
msg.Replace( wxT( "\t"), wxT( " " ) );
m_SelLayerBox->Append( msg );
//D(printf("appending layername=%s, ndx=%d, layer=%d\n", CONV_TO_UTF8(msg), listNdx, layer );)