Loading include/class_layerchoicebox.h +7 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,9 @@ class WinEDALayerChoiceBox : public wxBitmapComboBox { private: bool m_layerhotkeys; bool m_layerorder; public: WinEDALayerChoiceBox( WinEDA_Toolbar* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, Loading @@ -23,13 +26,16 @@ public: int GetChoice(); // Get Current Layer int GetLayerChoice(); int GetLayerSelection(); // Set Layer # int SetLayerSelection(int layer); // Reload the Layers void Resync(); bool SetLayersOrdered(bool value); bool SetLayersHotkeys(bool value); }; #define DECLARE_LAYERS_HOTKEY(list) int list[LAYER_COUNT] = \ Loading pcbnew/class_layerchoicebox.cpp +29 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ WinEDALayerChoiceBox::WinEDALayerChoiceBox( WinEDA_Toolbar* parent, wxWindowID i wxBitmapComboBox( parent, id, wxEmptyString, pos, size, n, choices, wxCB_READONLY ) { m_layerorder = true; m_layerhotkeys = true; } Loading @@ -36,6 +38,22 @@ WinEDALayerChoiceBox::WinEDALayerChoiceBox( WinEDA_Toolbar* parent, wxWindowID i wxBitmapComboBox( parent, id, wxEmptyString, pos, size, choices, wxCB_READONLY ) { m_layerorder = true; m_layerhotkeys = true; } bool WinEDALayerChoiceBox::SetLayersOrdered( bool value ) { m_layerorder = value; return m_layerorder; } bool WinEDALayerChoiceBox::SetLayersHotkeys( bool value ) { m_layerhotkeys = value; return m_layerhotkeys; } Loading @@ -47,7 +65,7 @@ int WinEDALayerChoiceBox::GetChoice() // Get Current Layer int WinEDALayerChoiceBox::GetLayerChoice() int WinEDALayerChoiceBox::GetLayerSelection() { return (long) GetClientData( GetSelection() ); } Loading Loading @@ -97,8 +115,11 @@ void WinEDALayerChoiceBox::Resync() wxMemoryDC bmpDC; wxBrush brush; wxString layername; int layerid = i; if( m_layerorder ) layerid = layertranscode[i]; int layerid = layertranscode[i]; if( !board->IsLayerEnabled( layerid ) ) continue; Loading @@ -114,7 +135,11 @@ void WinEDALayerChoiceBox::Resync() bmpDC.DrawRectangle( 0, 0, layerbmp.GetWidth(), layerbmp.GetHeight() ); layername = board->GetLayerName( layerid ); layername = AddHotkeyName( layername, s_Board_Editor_Hokeys_Descr, layerhk[layerid], false ); if( m_layerhotkeys ) layername = AddHotkeyName( layername, s_Board_Editor_Hokeys_Descr, layerhk[layerid], false ); Append( layername, layerbmp, (void*) layerid ); } } pcbnew/edit.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -861,8 +861,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) break; case ID_TOOLBARH_PCB_SELECT_LAYER: itmp = m_SelLayerBox->GetChoice(); setActiveLayer( (size_t) m_SelLayerBox->wxItemContainer::GetClientData( itmp ) ); setActiveLayer( (size_t) m_SelLayerBox->GetLayerSelection()); if( DisplayOpt.ContrastModeDisplay ) DrawPanel->Refresh( true ); break; Loading pcbnew/tracepcb.cpp +12 −6 Original line number Diff line number Diff line Loading @@ -55,9 +55,12 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) } #ifdef USE_WX_OVERLAY if(IsShown()) { DrawPanel->m_overlay.Reset(); wxDCOverlay overlaydc( DrawPanel->m_overlay, DC ); overlaydc.Clear(); } #endif screen->ClrRefreshReq(); Loading Loading @@ -91,9 +94,12 @@ void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) DrawGeneralRatsnest( DC ); #ifdef USE_WX_OVERLAY if(IsShown()) { DrawPanel->m_overlay.Reset(); wxDCOverlay overlaydc( DrawPanel->m_overlay, DC ); overlaydc.Clear(); } #endif GetScreen()->ClrRefreshReq(); Loading Loading
include/class_layerchoicebox.h +7 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,9 @@ class WinEDALayerChoiceBox : public wxBitmapComboBox { private: bool m_layerhotkeys; bool m_layerorder; public: WinEDALayerChoiceBox( WinEDA_Toolbar* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, Loading @@ -23,13 +26,16 @@ public: int GetChoice(); // Get Current Layer int GetLayerChoice(); int GetLayerSelection(); // Set Layer # int SetLayerSelection(int layer); // Reload the Layers void Resync(); bool SetLayersOrdered(bool value); bool SetLayersHotkeys(bool value); }; #define DECLARE_LAYERS_HOTKEY(list) int list[LAYER_COUNT] = \ Loading
pcbnew/class_layerchoicebox.cpp +29 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,8 @@ WinEDALayerChoiceBox::WinEDALayerChoiceBox( WinEDA_Toolbar* parent, wxWindowID i wxBitmapComboBox( parent, id, wxEmptyString, pos, size, n, choices, wxCB_READONLY ) { m_layerorder = true; m_layerhotkeys = true; } Loading @@ -36,6 +38,22 @@ WinEDALayerChoiceBox::WinEDALayerChoiceBox( WinEDA_Toolbar* parent, wxWindowID i wxBitmapComboBox( parent, id, wxEmptyString, pos, size, choices, wxCB_READONLY ) { m_layerorder = true; m_layerhotkeys = true; } bool WinEDALayerChoiceBox::SetLayersOrdered( bool value ) { m_layerorder = value; return m_layerorder; } bool WinEDALayerChoiceBox::SetLayersHotkeys( bool value ) { m_layerhotkeys = value; return m_layerhotkeys; } Loading @@ -47,7 +65,7 @@ int WinEDALayerChoiceBox::GetChoice() // Get Current Layer int WinEDALayerChoiceBox::GetLayerChoice() int WinEDALayerChoiceBox::GetLayerSelection() { return (long) GetClientData( GetSelection() ); } Loading Loading @@ -97,8 +115,11 @@ void WinEDALayerChoiceBox::Resync() wxMemoryDC bmpDC; wxBrush brush; wxString layername; int layerid = i; if( m_layerorder ) layerid = layertranscode[i]; int layerid = layertranscode[i]; if( !board->IsLayerEnabled( layerid ) ) continue; Loading @@ -114,7 +135,11 @@ void WinEDALayerChoiceBox::Resync() bmpDC.DrawRectangle( 0, 0, layerbmp.GetWidth(), layerbmp.GetHeight() ); layername = board->GetLayerName( layerid ); layername = AddHotkeyName( layername, s_Board_Editor_Hokeys_Descr, layerhk[layerid], false ); if( m_layerhotkeys ) layername = AddHotkeyName( layername, s_Board_Editor_Hokeys_Descr, layerhk[layerid], false ); Append( layername, layerbmp, (void*) layerid ); } }
pcbnew/edit.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -861,8 +861,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) break; case ID_TOOLBARH_PCB_SELECT_LAYER: itmp = m_SelLayerBox->GetChoice(); setActiveLayer( (size_t) m_SelLayerBox->wxItemContainer::GetClientData( itmp ) ); setActiveLayer( (size_t) m_SelLayerBox->GetLayerSelection()); if( DisplayOpt.ContrastModeDisplay ) DrawPanel->Refresh( true ); break; Loading
pcbnew/tracepcb.cpp +12 −6 Original line number Diff line number Diff line Loading @@ -55,9 +55,12 @@ void WinEDA_ModuleEditFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) } #ifdef USE_WX_OVERLAY if(IsShown()) { DrawPanel->m_overlay.Reset(); wxDCOverlay overlaydc( DrawPanel->m_overlay, DC ); overlaydc.Clear(); } #endif screen->ClrRefreshReq(); Loading Loading @@ -91,9 +94,12 @@ void WinEDA_PcbFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg ) DrawGeneralRatsnest( DC ); #ifdef USE_WX_OVERLAY if(IsShown()) { DrawPanel->m_overlay.Reset(); wxDCOverlay overlaydc( DrawPanel->m_overlay, DC ); overlaydc.Clear(); } #endif GetScreen()->ClrRefreshReq(); Loading