Symbol Editor: Allow save as all the time, as long as we have a symbol to save

There doesn't appear to be any reason why the LIBID needs to be populated
before a "save as", seeing as the user will be inputting the new lib name
and lib nickname via the dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9744
This commit is contained in:
Roberto Fernandez Bautista 2021-11-24 19:42:43 +00:00
parent a0fe10031d
commit 2eb5d4fa7a
2 changed files with 1 additions and 4 deletions

View File

@ -386,8 +386,7 @@ void SYMBOL_EDIT_FRAME::setupUIConditions()
auto saveSymbolAsCondition =
[this]( const SELECTION& aSel )
{
LIB_ID sel = GetTargetLibId();
return !sel.GetLibNickname().empty() && !sel.GetLibItemName().empty();
return getTargetSymbol() != nullptr;
};
mgr->SetConditions( ACTIONS::saveAll, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );

View File

@ -602,8 +602,6 @@ void SYMBOL_EDIT_FRAME::SaveLibraryAs()
void SYMBOL_EDIT_FRAME::SaveSymbolAs()
{
wxCHECK( GetTargetLibId().IsValid(), /* void */ );
saveSymbolAs();
m_treePane->GetLibTree()->RefreshLibTree();