Eeschema: fix yet another lock file issues.

Reset lock file when saving a schematic sheet to a different file name.
This prevents a file is already open error from being displayed when
opening the original file.

Fixes lp:1788507

https://bugs.launchpad.net/kicad/+bug/1788507
This commit is contained in:
Wayne Stambaugh 2018-09-24 08:56:54 -04:00
parent 6a02f788fd
commit 3c86bc951a
1 changed files with 4 additions and 1 deletions

View File

@ -146,9 +146,12 @@ bool SCH_EDIT_FRAME::SaveEEFile( SCH_SCREEN* aScreen, bool aSaveUnderNewName,
wxRemoveFile( autoSaveFileName.GetFullPath() ); wxRemoveFile( autoSaveFileName.GetFullPath() );
} }
// Update the screen and frame info. // Update the screen and frame info and reset the lock file.
if( aSaveUnderNewName ) if( aSaveUnderNewName )
{
aScreen->SetFileName( schematicFileName.GetFullPath() ); aScreen->SetFileName( schematicFileName.GetFullPath() );
LockFile( schematicFileName.GetFullPath() );
}
aScreen->ClrSave(); aScreen->ClrSave();
aScreen->ClrModify(); aScreen->ClrModify();