From f26b4058c2bc4cd87df1c2c7135fa732840aa753 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sat, 6 Feb 2021 08:28:06 -0500 Subject: [PATCH] Symbol editor: enable properties controls for inherited symbols. Fixes https://gitlab.com/kicad/code/kicad/-/issues/7126 --- eeschema/symbol_editor/symbol_edit_frame.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 850f16363a..5d5f95ffc8 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -367,6 +367,12 @@ void SYMBOL_EDIT_FRAME::setupUIConditions() && !m_libMgr->IsLibraryReadOnly( libName ); }; + auto canEditProperties = + [this] ( const SELECTION& sel ) + { + return m_my_part && ( !IsSymbolFromLegacyLibrary() || IsSymbolFromSchematic() ); + }; + mgr->SetConditions( ACTIONS::saveAll, ENABLE( schematicModifiedCond || libModifiedCondition ) ); mgr->SetConditions( ACTIONS::save, @@ -470,7 +476,8 @@ void SYMBOL_EDIT_FRAME::setupUIConditions() }; mgr->SetConditions( EE_ACTIONS::showDatasheet, ENABLE( haveDatasheetCond ) ); - mgr->SetConditions( EE_ACTIONS::symbolProperties, ENABLE( isEditableCond && haveSymbolCond ) ); + mgr->SetConditions( EE_ACTIONS::symbolProperties, + ENABLE( canEditProperties && haveSymbolCond ) ); mgr->SetConditions( EE_ACTIONS::runERC, ENABLE( haveSymbolCond ) ); mgr->SetConditions( EE_ACTIONS::pinTable, ENABLE( isEditableCond && haveSymbolCond ) );