This corrects the parameters for wxFileSelector in the ExportToSpectra() function.
Fixes https://bugs.launchpad.net/kicad/+bug/1736724 -S
From 18bb5b432aeee47b908b0094f48490025fbfe46a Mon Sep 17 00:00:00 2001 From: Seth Hillbrand <hillbr...@ucdavis.edu> Date: Wed, 6 Dec 2017 17:18:35 -0800 Subject: [PATCH] pcbnew: Correct spectra output default filename Fixes: lp:1736724 * https://bugs.launchpad.net/kicad/+bug/1736724 --- pcbnew/specctra_export.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 357aabb4b..b4a60ab90 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -74,20 +74,16 @@ static const double safetyMargin = 0.1; // see wxPcbStruct.h void PCB_EDIT_FRAME::ExportToSpecctra( wxCommandEvent& event ) { - wxString fullFileName = GetBoard()->GetFileName(); - wxString path; - wxString name; - wxString ext; + wxString fullFileName; wxString dsn_ext = SpecctraDsnFileExtension; wxString mask = SpecctraDsnFileWildcard(); + wxFileName fn( GetBoard()->GetFileName() ); - wxFileName::SplitPath( fullFileName, &path, &name, &ext ); + fn.SetExt( dsn_ext ); - name += dsn_ext; - - fullFileName = EDA_FILE_SELECTOR( _( "Specctra DSN file:" ), - path, - name, // name.ext without path! + fullFileName = EDA_FILE_SELECTOR( _( "Specctra DSN File" ), + fn.GetPath(), + fn.GetFullName(), dsn_ext, mask, this, -- 2.11.0
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp