Commit patch to fix bug 1108838 (+ fix a very minor fix in eeschema, when loading a new component)

This commit is contained in:
Jacobo Aragunde Perez 2013-01-30 17:15:45 +01:00 committed by jean-pierre charras
parent eacc8b93f0
commit 85562b45e8
2 changed files with 7 additions and 2 deletions

View File

@ -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( "_" ) );

View File

@ -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 );