From 3f58dce1de76d71e8397ef5cde31b1b7b523829f 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 cd08aa3d89..158a4dcbf5 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -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();