From ea3f6c840615624dbcbcff32009bf1fea594462b Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 1 Sep 2022 14:19:11 +0100 Subject: [PATCH] Make sure dirty flag gets set, and leave save enabled regardless. Fixes https://gitlab.com/kicad/code/kicad/issues/11824 (cherry picked from commit 09773e3e2e1d7be67c9fe084769e7bed9fa6a112) --- pcbnew/tools/footprint_editor_control.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/footprint_editor_control.cpp b/pcbnew/tools/footprint_editor_control.cpp index 1d6b879ffc..43b82ebebb 100644 --- a/pcbnew/tools/footprint_editor_control.cpp +++ b/pcbnew/tools/footprint_editor_control.cpp @@ -24,7 +24,9 @@ */ #include "footprint_editor_control.h" -#include "kicad_clipboard.h" +#include +#include +#include #include #include #include @@ -117,7 +119,7 @@ bool FOOTPRINT_EDITOR_CONTROL::Init() ctxMenu.AddItem( PCB_ACTIONS::createFootprint, libSelectedCondition ); ctxMenu.AddSeparator(); - ctxMenu.AddItem( ACTIONS::save, libSelectedCondition || libInferredCondition ); + ctxMenu.AddItem( ACTIONS::save, SELECTION_CONDITIONS::ShowAlways ); ctxMenu.AddItem( ACTIONS::saveAs, libSelectedCondition ); ctxMenu.AddItem( ACTIONS::saveCopyAs, fpSelectedCondition ); ctxMenu.AddItem( ACTIONS::revert, libSelectedCondition || libInferredCondition ); @@ -221,6 +223,7 @@ int FOOTPRINT_EDITOR_CONTROL::CreateFootprint( const TOOL_EVENT& aEvent ) m_frame->Zoom_Automatique( false ); m_frame->GetScreen()->SetContentModified(); + m_frame->OnModify(); // If selected from the library tree then go ahead and save it there if( !selected.GetLibNickname().empty() )