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 c5c89fd216
commit 3f58dce1de
1 changed files with 4 additions and 1 deletions

View File

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