Remove useless method (ResyncBitmapOnly)

This commit is contained in:
Alex Shvartzkop 2024-05-21 03:42:45 +03:00
parent cb76ad3206
commit 4e306a7d76
3 changed files with 0 additions and 20 deletions

View File

@ -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 ), wxBitmapComboBox( parent, id, wxEmptyString, pos, size, n, choices, wxCB_READONLY ),
LAYER_SELECTOR() LAYER_SELECTOR()
{ {
if( choices != nullptr )
ResyncBitmapOnly();
#ifdef __WXMAC__ #ifdef __WXMAC__
GetParent()->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( LAYER_BOX_SELECTOR::onKeyDown ), GetParent()->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( LAYER_BOX_SELECTOR::onKeyDown ),
nullptr, this ); 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<int>( 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__ #ifdef __WXMAC__
void LAYER_BOX_SELECTOR::onKeyDown( wxKeyEvent& aEvent ) void LAYER_BOX_SELECTOR::onKeyDown( wxKeyEvent& aEvent )

View File

@ -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 // NOTE: Active layer in GerbView is stored as 0-indexed, but layer color is
// stored according to the GERBER_DRAW_LAYER() offset. // stored according to the GERBER_DRAW_LAYER() offset.
m_frame->SetLayerColor( GERBER_DRAW_LAYER( aLayer ), aColor ); m_frame->SetLayerColor( GERBER_DRAW_LAYER( aLayer ), aColor );
m_frame->m_SelLayerBox->ResyncBitmapOnly();
KIGFX::VIEW* view = m_frame->GetCanvas()->GetView(); KIGFX::VIEW* view = m_frame->GetCanvas()->GetView();
COLOR_SETTINGS* color_settings = m_frame->GetColorSettings(); COLOR_SETTINGS* color_settings = m_frame->GetColorSettings();

View File

@ -81,9 +81,6 @@ public:
// Virtual pure function because GerbView uses its own functions in a derived class // Virtual pure function because GerbView uses its own functions in a derived class
virtual void Resync() = 0; virtual void Resync() = 0;
// Reload the Layers bitmaps colors
void ResyncBitmapOnly();
private: private:
#ifdef __WXMAC__ #ifdef __WXMAC__
void onKeyDown( wxKeyEvent& aEvent ); void onKeyDown( wxKeyEvent& aEvent );