Commit 2c5b7945 authored by Maciej Suminski's avatar Maciej Suminski

Fixed crash in pad properties dialog with wxWidgets 2.8.

parent 568fc74a
......@@ -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() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment