From 7d7a48070e4aa585b77d017b33ca98d812d70518 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 18 Jan 2023 11:51:19 +0000 Subject: [PATCH] Separate error messages when sim model and project paths are the same. --- eeschema/sim/sim_lib_mgr.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/eeschema/sim/sim_lib_mgr.cpp b/eeschema/sim/sim_lib_mgr.cpp index 7b990ced15..7ebf6d2a87 100644 --- a/eeschema/sim/sim_lib_mgr.cpp +++ b/eeschema/sim/sim_lib_mgr.cpp @@ -74,9 +74,17 @@ wxString SIM_LIB_MGR::ResolveLibraryPath( const wxString& aLibraryPath, const PR if( !spiceLibDir.IsEmpty() && spiceLibFn.MakeAbsolute( spiceLibDir ) && spiceLibFn.Exists() ) return spiceLibFn.GetFullPath(); - THROW_IO_ERROR( wxString::Format( _( "Simulation model library not found at '%s' or '%s'" ), - projectFn.GetFullPath(), - spiceLibFn.GetFullPath() ) ); + if( projectFn.GetFullPath() == spiceLibFn.GetFullPath() ) + { + THROW_IO_ERROR( wxString::Format( _( "Simulation model library not found at '%s'" ), + spiceLibFn.GetFullPath() ) ); + } + else + { + THROW_IO_ERROR( wxString::Format( _( "Simulation model library not found at '%s' or '%s'" ), + projectFn.GetFullPath(), + spiceLibFn.GetFullPath() ) ); + } }