automatically add extension to sim workbook files

CHANGED: When a workbook file is saved from the simulation dialog
in eeschema, the extension is automatically added if it is not
specified. This behaviour is consistent with the workbook loading
dialog, which filters the filelist for only ".wbk" files with no
"all files" option.
This commit is contained in:
Dan Weatherill 2018-01-04 19:28:54 +00:00 committed by Wayne Stambaugh
parent 9689200984
commit 0dcf95ee1a
1 changed files with 10 additions and 1 deletions

View File

@ -706,7 +706,16 @@ bool SIM_PLOT_FRAME::loadWorkbook( const wxString& aPath )
bool SIM_PLOT_FRAME::saveWorkbook( const wxString& aPath ) bool SIM_PLOT_FRAME::saveWorkbook( const wxString& aPath )
{ {
wxTextFile file( aPath );
wxString savePath = aPath;
if( !savePath.Lower().EndsWith(".wbk"))
{
savePath += ".wbk";
};
wxTextFile file( savePath );
if( file.Exists() ) if( file.Exists() )
{ {