From 88cdb8bbbe7a33f9a0e2d0ff84d61662ee35e6f9 Mon Sep 17 00:00:00 2001 From: Cirilo Bernardo Date: Wed, 21 Sep 2016 08:55:35 +1000 Subject: [PATCH] Removed dialog, instead the autosave() is always invoked for a dirty PCB --- pcbnew/dialogs/dialog_export_step.cpp | 37 ++++++--------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/pcbnew/dialogs/dialog_export_step.cpp b/pcbnew/dialogs/dialog_export_step.cpp index b330d0b348..d489b39dbf 100644 --- a/pcbnew/dialogs/dialog_export_step.cpp +++ b/pcbnew/dialogs/dialog_export_step.cpp @@ -189,38 +189,17 @@ void PCB_EDIT_FRAME::OnExportSTEP( wxCommandEvent& event ) if( GetScreen()->IsModify() || brdFile.GetFullPath().empty() ) { - int idx = wxMessageBox( _( "The PCB has been modified; save before proceeding?" ), - _( "STEP Export: Modified PCB" ), wxYES_NO | wxCANCEL, this ); - - switch( idx ) + if( !doAutoSave() ) { - case wxYES: - if( !doAutoSave() ) - { - 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; + wxMessageBox( _( "STEP export failed; please save the PCB and try again" ), + _( "STEP Export" ) ); + return; } + brdFile = GetBoard()->GetFileName(); + brdName = GetAutoSaveFilePrefix(); + brdName.append( brdFile.GetName() ); + brdFile.SetName( brdName ); brdName = brdFile.GetFullPath(); }