diff --git a/common/edaappl.cpp b/common/edaappl.cpp index c3580aca02..af6749bae4 100644 --- a/common/edaappl.cpp +++ b/common/edaappl.cpp @@ -1131,13 +1131,18 @@ void EDA_APP::InsertLibraryPath( const wxString& aPaths, size_t aIndex ) bool EDA_APP::LockFile( const wxString& fileName ) { + // first make absolute and normalize, to avoid that different lock files + // for the same file can be created + wxFileName fn = fileName; + fn.MakeAbsolute(); + // semaphore to protect the edition of the file by more than one instance if( m_oneInstancePerFileChecker != NULL ) { // it means that we had an open file and we are opening a different one delete m_oneInstancePerFileChecker; } - wxString lockFileName = fileName + wxT( ".lock" ); + wxString lockFileName = fn.GetFullPath() + wxT( ".lock" ); lockFileName.Replace( wxT( "/" ), wxT( "_" ) ); // We can have filenames coming from Windows, so also convert Windows separator lockFileName.Replace( wxT( "\\" ), wxT( "_" ) ); diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index 7c0feb3932..b84f89b03f 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -263,7 +263,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* aDC, component->SetCurrentSheetPath( &GetCurrentSheet() ); component->GetMsgPanelInfo( items ); SetMsgPanel( items ); - component->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode, g_GhostColor ); + component->Draw( m_canvas, aDC, wxPoint( 0, 0 ), g_XorMode ); component->SetFlags( IS_NEW ); MoveItem( (SCH_ITEM*) component, aDC );