From afc6d29fde0b5a8dbec1c9e794dea4972139550c Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Wed, 12 May 2021 00:57:11 +0200 Subject: [PATCH] Fix relative path used where absolute path should be --- eeschema/sim/sim_plot_frame.cpp | 4 ++-- eeschema/sim/spice_settings.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/sim/sim_plot_frame.cpp b/eeschema/sim/sim_plot_frame.cpp index d695912f90..a75a70c27b 100644 --- a/eeschema/sim/sim_plot_frame.cpp +++ b/eeschema/sim/sim_plot_frame.cpp @@ -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; diff --git a/eeschema/sim/spice_settings.h b/eeschema/sim/spice_settings.h index c2e02d91e9..2b16f0e41a 100644 --- a/eeschema/sim/spice_settings.h +++ b/eeschema/sim/spice_settings.h @@ -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;