Fix relative path used where absolute path should be

This commit is contained in:
Mikolaj Wielgus 2021-05-12 00:57:11 +02:00 committed by Wayne Stambaugh
parent 260e32c9e7
commit afc6d29fde
2 changed files with 3 additions and 3 deletions

View File

@ -1131,7 +1131,7 @@ void SIM_PLOT_FRAME::menuSaveWorkbook( wxCommandEvent& event )
return;
}
if ( !saveWorkbook( m_simulator->Settings()->GetWorkbookFilename() ) )
if ( !saveWorkbook( Prj().AbsolutePath( m_simulator->Settings()->GetWorkbookFilename() ) ) )
DisplayErrorMessage( this, _( "There was an error while saving the workbook file" ) );
}
@ -1537,7 +1537,7 @@ bool SIM_PLOT_FRAME::canCloseWindow( wxCloseEvent& aEvent )
wxString msg = _( "Save changes to \"%s\" before closing?" );
return HandleUnsavedChanges( this, wxString::Format( msg, filename.GetFullName() ),
[&]()->bool { return saveWorkbook( filename.GetFullPath() ); } );
[&]()->bool { return saveWorkbook( Prj().AbsolutePath ( filename.GetFullName() ) ); } );
}
return true;

View File

@ -44,7 +44,7 @@ public:
bool operator!=( const SPICE_SIMULATOR_SETTINGS& aRhs ) const { return !( *this == aRhs ); }
wxString GetWorkbookFilename() const { return m_workbookFilename; }
void SetWorkbookFilename( wxString aFilename ) { m_workbookFilename = aFilename; }
void SetWorkbookFilename( wxString aFilename ) { m_workbookFilename = aFilename; }
private:
wxString m_workbookFilename;