Symbol editor: enable properties controls for inherited symbols.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7126
This commit is contained in:
Wayne Stambaugh 2021-02-06 08:28:06 -05:00
parent 65ca3da22d
commit f26b4058c2
1 changed files with 8 additions and 1 deletions

View File

@ -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 ) );