Fix asserts on later wxWidgets versions.

Fixes https://gitlab.com/kicad/code/kicad/issues/5197
This commit is contained in:
Jeff Young 2020-08-16 11:49:16 +01:00
parent e5f2015a9c
commit 92322667d6
1 changed files with 5 additions and 4 deletions

View File

@ -999,7 +999,7 @@ void APPEARANCE_CONTROLS::rebuildObjects()
"right click for menu" ) ); "right click for menu" ) );
m_objectsSizer->Add( swatch, wxGBPosition( aRow, 0 ), wxDefaultSpan, m_objectsSizer->Add( swatch, wxGBPosition( aRow, 0 ), wxDefaultSpan,
wxALIGN_CENTER_VERTICAL | wxEXPAND | topMargin | wxLEFT | wxRIGHT, 1 ); wxALIGN_CENTER_VERTICAL | topMargin | wxLEFT | wxRIGHT, 1 );
aSetting->ctl_color = swatch; aSetting->ctl_color = swatch;
swatch->Bind( COLOR_SWATCH_CHANGED, swatch->Bind( COLOR_SWATCH_CHANGED,
@ -1007,8 +1007,9 @@ void APPEARANCE_CONTROLS::rebuildObjects()
} }
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE( m_windowObjects, layer, BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE( m_windowObjects, layer,
KiBitmap( visibility_xpm ), KiBitmap( visibility_off_xpm ), KiBitmap( visibility_xpm ),
aSetting->visible ); KiBitmap( visibility_off_xpm ),
aSetting->visible );
wxString tip; wxString tip;
tip.Printf( _( "Show or hide %s" ), aSetting->label.Lower() ); tip.Printf( _( "Show or hide %s" ), aSetting->label.Lower() );
@ -1050,7 +1051,7 @@ void APPEARANCE_CONTROLS::rebuildObjects()
slider->SetToolTip( tip ); slider->SetToolTip( tip );
m_objectsSizer->Add( slider, wxGBPosition( aRow, 3 ), wxDefaultSpan, m_objectsSizer->Add( slider, wxGBPosition( aRow, 3 ), wxDefaultSpan,
sliderAlignment | topMargin | wxLEFT | wxRIGHT | wxEXPAND, 1 ); sliderAlignment | topMargin | wxLEFT | wxRIGHT, 1 );
aSetting->ctl_opacity = slider; aSetting->ctl_opacity = slider;
auto opacitySliderHandler = auto opacitySliderHandler =