Fixed, pcbnew: crashes when removing a 3D shape in dialog box (wxGTK specific)
This commit is contained in:
parent
1873e058dc
commit
51efe030e1
Binary file not shown.
1536
internat/fr/kicad.po
1536
internat/fr/kicad.po
File diff suppressed because it is too large
Load Diff
|
@ -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] );
|
||||
}
|
||||
|
||||
|
|
|
@ -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] );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue