diff --git a/common/widgets/layer_box_selector.cpp b/common/widgets/layer_box_selector.cpp index da19b8665b..d99a07c618 100644 --- a/common/widgets/layer_box_selector.cpp +++ b/common/widgets/layer_box_selector.cpp @@ -80,9 +80,6 @@ LAYER_BOX_SELECTOR::LAYER_BOX_SELECTOR( wxWindow* parent, wxWindowID id, const w wxBitmapComboBox( parent, id, wxEmptyString, pos, size, n, choices, wxCB_READONLY ), LAYER_SELECTOR() { - if( choices != nullptr ) - ResyncBitmapOnly(); - #ifdef __WXMAC__ GetParent()->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( LAYER_BOX_SELECTOR::onKeyDown ), nullptr, this ); @@ -132,19 +129,6 @@ int LAYER_BOX_SELECTOR::SetLayerSelection( int layer ) } -void LAYER_BOX_SELECTOR::ResyncBitmapOnly() -{ - DPI_SCALING_COMMON dpi( nullptr, this ); - int size = static_cast( dpi.GetScaleFactor() * 14 ); - - for( int i = 0; i < (int) GetCount(); ++i ) - { - wxBitmap layerbmp( size, size ); - DrawColorSwatch( layerbmp, getLayerColor( LAYER_PCB_BACKGROUND ), getLayerColor( i ) ); - } -} - - #ifdef __WXMAC__ void LAYER_BOX_SELECTOR::onKeyDown( wxKeyEvent& aEvent ) diff --git a/gerbview/widgets/gerbview_layer_widget.cpp b/gerbview/widgets/gerbview_layer_widget.cpp index d5d38286f7..b8ec42f572 100644 --- a/gerbview/widgets/gerbview_layer_widget.cpp +++ b/gerbview/widgets/gerbview_layer_widget.cpp @@ -339,7 +339,6 @@ void GERBER_LAYER_WIDGET::OnLayerColorChange( int aLayer, const COLOR4D& aColor // NOTE: Active layer in GerbView is stored as 0-indexed, but layer color is // stored according to the GERBER_DRAW_LAYER() offset. m_frame->SetLayerColor( GERBER_DRAW_LAYER( aLayer ), aColor ); - m_frame->m_SelLayerBox->ResyncBitmapOnly(); KIGFX::VIEW* view = m_frame->GetCanvas()->GetView(); COLOR_SETTINGS* color_settings = m_frame->GetColorSettings(); diff --git a/include/widgets/layer_box_selector.h b/include/widgets/layer_box_selector.h index 9d8be8f35c..e275bd1bcc 100644 --- a/include/widgets/layer_box_selector.h +++ b/include/widgets/layer_box_selector.h @@ -81,9 +81,6 @@ public: // Virtual pure function because GerbView uses its own functions in a derived class virtual void Resync() = 0; - // Reload the Layers bitmaps colors - void ResyncBitmapOnly(); - private: #ifdef __WXMAC__ void onKeyDown( wxKeyEvent& aEvent );