Removed dialog, instead the autosave() is always invoked for a dirty PCB
This commit is contained in:
parent
8b259f2837
commit
88cdb8bbbe
|
@ -189,38 +189,17 @@ void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event )
|
||||||
|
|
||||||
if( GetScreen()->IsModify() || brdFile.GetFullPath().empty() )
|
if( GetScreen()->IsModify() || brdFile.GetFullPath().empty() )
|
||||||
{
|
{
|
||||||
int idx = wxMessageBox( _( "The PCB has been modified; save before proceeding?" ),
|
if( !doAutoSave() )
|
||||||
_( "STEP Export: Modified PCB" ), wxYES_NO | wxCANCEL, this );
|
|
||||||
|
|
||||||
switch( idx )
|
|
||||||
{
|
{
|
||||||
case wxYES:
|
wxMessageBox( _( "STEP export failed; please save the PCB and try again" ),
|
||||||
if( !doAutoSave() )
|
_( "STEP Export" ) );
|
||||||
{
|
return;
|
||||||
wxMessageBox( _( "Autosave failed; STEP export cancelled" ),
|
|
||||||
_( "STEP Export" ) );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
brdFile = GetBoard()->GetFileName();
|
|
||||||
brdName = GetAutoSaveFilePrefix();
|
|
||||||
brdName.append( brdFile.GetName() );
|
|
||||||
brdFile.SetName( brdName );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case wxNO:
|
|
||||||
if( brdFile.GetFullPath().empty() )
|
|
||||||
{
|
|
||||||
wxMessageBox( _( "No board file; STEP export cancelled" ),
|
|
||||||
_( "STEP Export" ) );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
brdFile = GetBoard()->GetFileName();
|
||||||
|
brdName = GetAutoSaveFilePrefix();
|
||||||
|
brdName.append( brdFile.GetName() );
|
||||||
|
brdFile.SetName( brdName );
|
||||||
brdName = brdFile.GetFullPath();
|
brdName = brdFile.GetFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue