kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #32176
[PATCH] Set modified flag on new sheets
The attached patch fixes https://bugs.launchpad.net/kicad/+bug/1736054
Newly created sheets should have their modified flags set so that they are
considered "unsaved" until they are successfully written to disk.
-S
From 3ed3f6d789795cd62fd5d73f692306011723c035 Mon Sep 17 00:00:00 2001
From: Seth Hillbrand <hillbrand@xxxxxxxxxxx>
Date: Mon, 4 Dec 2017 13:43:34 -0800
Subject: [PATCH] Eeschema: Set "edited" flag on newly created sheets
Forces newly created sheet to be considered for saving when created.
Fixes: lp:1736054
* https://bugs.launchpad.net/kicad/+bug/1736054
---
eeschema/sheet.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp
index 650df56d0..c5cc5e252 100644
--- a/eeschema/sheet.cpp
+++ b/eeschema/sheet.cpp
@@ -143,6 +143,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy )
else // New file.
{
aSheet->SetScreen( new SCH_SCREEN( &Kiway() ) );
+ aSheet->GetScreen()->SetModify();
aSheet->GetScreen()->SetMaxUndoItems( m_UndoRedoCountMax );
aSheet->GetScreen()->SetFileName( newFilename );
}
--
2.11.0
Follow ups