From 3c86bc951abd5179b88caef3d0615f6409ca9a0b Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 24 Sep 2018 08:56:54 -0400 Subject: [PATCH] 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 --- eeschema/files-io.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 24ef300e64..eb01665f64 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -146,9 +146,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();