diff --git a/pcbnew/dialogs/dialog_export_vrml.cpp b/pcbnew/dialogs/dialog_export_vrml.cpp index 499d1ebe73..697204e7b2 100644 --- a/pcbnew/dialogs/dialog_export_vrml.cpp +++ b/pcbnew/dialogs/dialog_export_vrml.cpp @@ -206,6 +206,9 @@ void PCB_EDIT_FRAME::OnExportVRML( wxCommandEvent& event ) dlg.FilePicker()->SetPath( fn.GetFullPath() ); dlg.SetSubdir( subDirFor3Dshapes ); + if( dlg.ShowModal() != wxID_OK ) + return; + double aXRef = dlg.GetXRef(); double aYRef = dlg.GetYRef(); @@ -221,9 +224,6 @@ void PCB_EDIT_FRAME::OnExportVRML( wxCommandEvent& event ) bool useRelativePaths = dlg.GetUseRelativePathsOption(); bool usePlainPCB = dlg.GetUsePlainPCBOption(); - if( dlg.ShowModal() != wxID_OK ) - return; - last_vrmlName = dlg.FilePicker()->GetPath(); wxFileName modelPath = last_vrmlName; wxBusyCursor dummy;