PANEL_FP_PROPERTIES_3D_MODEL: fix a wxWidgets alert.

Happens when there is no 3D model in 3D grid list, and when trying to add
a new 3D model, but canceling the 3D dialog file selector.
This commit is contained in:
jean-pierre charras 2023-06-08 17:46:38 +02:00
parent 3667e4f6b2
commit 14c10d2a37
1 changed files with 6 additions and 2 deletions

View File

@ -311,8 +311,12 @@ void PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel( wxCommandEvent& )
if( !S3D::Select3DModel( m_parentDialog, m_frame->Prj().Get3DCacheManager(), initialpath, filter, &model )
|| model.m_Filename.empty() )
{
select3DModel( selected );
updateValidateStatus( selected );
if( selected >= 0 )
{
select3DModel( selected );
updateValidateStatus( selected );
}
return;
}