Commit f41cc301 authored by charras's avatar charras

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

parent e00bbb8c
No preview for this file type
This diff is collapsed.
...@@ -254,6 +254,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ...@@ -254,6 +254,7 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
else else
ll--; ll--;
SwitchLayer( DC, ll ); SwitchLayer( DC, ll );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_SWITCH_LAYER_TO_NEXT: case HK_SWITCH_LAYER_TO_NEXT:
...@@ -267,38 +268,50 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct ...@@ -267,38 +268,50 @@ void WinEDA_PcbFrame::OnHotKey( wxDC* DC, int hotkey, EDA_BaseStruct* DrawStruct
else else
ll++; ll++;
SwitchLayer( DC, 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; break;
case HK_SWITCH_LAYER_TO_COMPONENT: case HK_SWITCH_LAYER_TO_COMPONENT:
SwitchLayer( DC, LAYER_N_FRONT ); SwitchLayer( DC, LAYER_N_FRONT );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_SWITCH_LAYER_TO_COPPER: case HK_SWITCH_LAYER_TO_COPPER:
SwitchLayer( DC, LAYER_N_BACK ); SwitchLayer( DC, LAYER_N_BACK );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_SWITCH_LAYER_TO_INNER1: case HK_SWITCH_LAYER_TO_INNER1:
SwitchLayer( DC, LAYER_N_2 ); SwitchLayer( DC, LAYER_N_2 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_SWITCH_LAYER_TO_INNER2: case HK_SWITCH_LAYER_TO_INNER2:
SwitchLayer( DC, LAYER_N_3 ); SwitchLayer( DC, LAYER_N_3 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_SWITCH_LAYER_TO_INNER3: case HK_SWITCH_LAYER_TO_INNER3:
SwitchLayer( DC, LAYER_N_4 ); SwitchLayer( DC, LAYER_N_4 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_SWITCH_LAYER_TO_INNER4: case HK_SWITCH_LAYER_TO_INNER4:
SwitchLayer( DC, LAYER_N_5 ); SwitchLayer( DC, LAYER_N_5 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_SWITCH_LAYER_TO_INNER5: case HK_SWITCH_LAYER_TO_INNER5:
SwitchLayer( DC, LAYER_N_6 ); SwitchLayer( DC, LAYER_N_6 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_SWITCH_LAYER_TO_INNER6: case HK_SWITCH_LAYER_TO_INNER6:
SwitchLayer( DC, LAYER_N_7 ); SwitchLayer( DC, LAYER_N_7 );
// m_Layers->SelectLayer(GetScreen()->m_Active_Layer); // Ensure Layer manager synchronization
break; break;
case HK_HELP: // Display Current hotkey list case HK_HELP: // Display Current hotkey list
......
...@@ -24,8 +24,6 @@ ...@@ -24,8 +24,6 @@
#include "hotkeys.h" #include "hotkeys.h"
#define MUWAVE_ENBL
#define SEL_LAYER_HELP _( \ #define SEL_LAYER_HELP _( \
"Show active layer selections\nand select layer pair for route and place via" ) "Show active layer selections\nand select layer pair for route and place via" )
...@@ -387,15 +385,19 @@ void WinEDA_PcbFrame::ReCreateOptToolbar() ...@@ -387,15 +385,19 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE, m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_DesignSettings.IsElementVisible( MOD_TEXT_INVISIBLE )); g_DesignSettings.IsElementVisible( MOD_TEXT_INVISIBLE ));
#ifdef MUWAVE_ENBL
m_OptionsToolBar->AddSeparator(); m_OptionsToolBar->AddSeparator();
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, m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
wxEmptyString, wxEmptyString,
wxBitmap( mw_toolbar_xpm ), 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 ); wxITEM_CHECK );
#endif
m_OptionsToolBar->Realize(); m_OptionsToolBar->Realize();
SetToolbars(); SetToolbars();
...@@ -746,6 +748,12 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent ) ...@@ -746,6 +748,12 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
wxString msg = GetBoard()->GetLayerName( layer ); wxString msg = GetBoard()->GetLayerName( layer );
msg = AddHotkeyName( msg, s_Board_Editor_Hokeys_Descr, msg = AddHotkeyName( msg, s_Board_Editor_Hokeys_Descr,
HK_SwitchLayer[layer] ); 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 ); m_SelLayerBox->Append( msg );
//D(printf("appending layername=%s, ndx=%d, layer=%d\n", CONV_TO_UTF8(msg), listNdx, layer );) //D(printf("appending layername=%s, ndx=%d, layer=%d\n", CONV_TO_UTF8(msg), listNdx, layer );)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment