Fixed, pcbnew: crashes when removing a 3D shape in dialog box (wxGTK specific)

This commit is contained in:
charras 2009-08-17 19:04:51 +00:00
parent 1873e058dc
commit 51efe030e1
4 changed files with 817 additions and 739 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -296,6 +296,16 @@ void DIALOG_MODULE_BOARD_EDITOR::On3DShapeNameSelected(wxCommandEvent& event)
if( m_LastSelected3DShapeIndex >= 0 )
TransfertDisplayTo3DValues( m_LastSelected3DShapeIndex );
m_LastSelected3DShapeIndex = m_3D_ShapeNameListBox->GetSelection();
if( m_LastSelected3DShapeIndex < 0 ) // happens under wxGTK when deleting an item in m_3D_ShapeNameListBox wxListBox
return;
if( m_LastSelected3DShapeIndex >= (int) m_Shapes3D_list.size() )
{
wxMessageBox(wxT("On3DShapeNameSelected() error"));
m_LastSelected3DShapeIndex = -1;
return;
}
Transfert3DValuesToDisplay( m_Shapes3D_list[m_LastSelected3DShapeIndex] );
}

View File

@ -174,6 +174,16 @@ void DIALOG_MODULE_MODULE_EDITOR::On3DShapeNameSelected(wxCommandEvent& event)
if( m_LastSelected3DShapeIndex >= 0 )
TransfertDisplayTo3DValues( m_LastSelected3DShapeIndex );
m_LastSelected3DShapeIndex = m_3D_ShapeNameListBox->GetSelection();
if( m_LastSelected3DShapeIndex < 0 ) // happens under wxGTK when deleting an item in m_3D_ShapeNameListBox wxListBox
return;
if( m_LastSelected3DShapeIndex >= (int)m_Shapes3D_list.size() )
{
wxMessageBox(wxT("On3DShapeNameSelected() error"));
m_LastSelected3DShapeIndex = -1;
return;
}
Transfert3DValuesToDisplay( m_Shapes3D_list[m_LastSelected3DShapeIndex] );
}