Fixed crash in pad properties dialog with wxWidgets 2.8.

This commit is contained in:
Maciej Suminski 2014-07-15 16:02:08 +02:00
parent 568fc74a3c
commit 2c5b79456e
1 changed files with 14 additions and 1 deletions

View File

@ -130,6 +130,7 @@ private:
bool transferDataToPad( D_PAD* aPad );
// event handlers:
void OnResize( wxSizeEvent& event );
void OnPadShapeSelection( wxCommandEvent& event );
void OnDrillShapeSelected( wxCommandEvent& event );
@ -180,10 +181,15 @@ DIALOG_PAD_PROPERTIES::DIALOG_PAD_PROPERTIES( PCB_BASE_FRAME* aParent, D_PAD* aP
{
m_panelShowPadGal->UseColorScheme( m_board->GetColorsSettings() );
m_panelShowPadGal->SwitchBackend( m_parent->GetGalCanvas()->GetBackend() );
m_panelShowPad->Hide();
#if !wxCHECK_VERSION( 3, 0, 0 )
m_panelShowPadGal->SetSize( m_panelShowPad->GetSize() );
#endif
m_panelShowPadGal->Show();
m_panelShowPad->Hide();
m_panelShowPadGal->GetView()->Add( m_dummyPad );
m_panelShowPadGal->StartDrawing();
Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_PAD_PROPERTIES::OnResize ) );
}
else
{
@ -516,6 +522,13 @@ void DIALOG_PAD_PROPERTIES::initValues()
}
void DIALOG_PAD_PROPERTIES::OnResize( wxSizeEvent& event )
{
redraw();
event.Skip();
}
void DIALOG_PAD_PROPERTIES::OnPadShapeSelection( wxCommandEvent& event )
{
switch( m_PadShape->GetSelection() )