Change Save Symbol As... to Save Symbol Copy As...
See details in the bug report. (It's very complicated.) Fixes https://gitlab.com/kicad/code/kicad/-/issues/12504
This commit is contained in:
parent
72c44d7fa3
commit
14d6ff8946
|
@ -52,7 +52,7 @@ void SYMBOL_EDIT_FRAME::doReCreateMenuBar()
|
|||
|
||||
fileMenu->AppendSeparator();
|
||||
fileMenu->Add( ACTIONS::save );
|
||||
fileMenu->Add( EE_ACTIONS::saveSymbolAs );
|
||||
fileMenu->Add( EE_ACTIONS::saveSymbolCopyAs );
|
||||
|
||||
if( !IsSymbolFromSchematic() )
|
||||
fileMenu->Add( ACTIONS::saveAll );
|
||||
|
|
|
@ -430,7 +430,7 @@ void SYMBOL_EDIT_FRAME::setupUIConditions()
|
|||
mgr->SetConditions( ACTIONS::saveAll, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
|
||||
mgr->SetConditions( ACTIONS::save, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
|
||||
mgr->SetConditions( EE_ACTIONS::saveLibraryAs, ENABLE( libSelectedCondition ) );
|
||||
mgr->SetConditions( EE_ACTIONS::saveSymbolAs, ENABLE( saveSymbolAsCondition ) );
|
||||
mgr->SetConditions( EE_ACTIONS::saveSymbolCopyAs, ENABLE( saveSymbolAsCondition ) );
|
||||
mgr->SetConditions( EE_ACTIONS::newSymbol, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
|
||||
mgr->SetConditions( EE_ACTIONS::importSymbol, ENABLE( SELECTION_CONDITIONS::ShowAlways ) );
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ public:
|
|||
/**
|
||||
* Save the currently selected symbol to a new name and/or location.
|
||||
*/
|
||||
void SaveSymbolAs();
|
||||
void SaveSymbolCopyAs();
|
||||
|
||||
/**
|
||||
* Save the currently selected library to a new file.
|
||||
|
@ -421,7 +421,7 @@ private:
|
|||
// Set up the tool framework
|
||||
void setupTools();
|
||||
|
||||
void saveSymbolAs();
|
||||
void saveSymbolCopyAs();
|
||||
|
||||
/**
|
||||
* Save the changes to the current library.
|
||||
|
|
|
@ -548,9 +548,9 @@ void SYMBOL_EDIT_FRAME::SaveLibraryAs()
|
|||
}
|
||||
|
||||
|
||||
void SYMBOL_EDIT_FRAME::SaveSymbolAs()
|
||||
void SYMBOL_EDIT_FRAME::SaveSymbolCopyAs()
|
||||
{
|
||||
saveSymbolAs();
|
||||
saveSymbolCopyAs();
|
||||
|
||||
m_treePane->GetLibTree()->RefreshLibTree();
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ private:
|
|||
};
|
||||
|
||||
|
||||
void SYMBOL_EDIT_FRAME::saveSymbolAs()
|
||||
void SYMBOL_EDIT_FRAME::saveSymbolCopyAs()
|
||||
{
|
||||
LIB_SYMBOL* symbol = getTargetSymbol();
|
||||
|
||||
|
@ -745,8 +745,6 @@ void SYMBOL_EDIT_FRAME::saveSymbolAs()
|
|||
|
||||
m_libMgr->UpdateSymbol( &new_symbol, libraryName );
|
||||
SyncLibraries( false );
|
||||
m_treePane->GetLibTree()->SelectLibId( LIB_ID( libraryName, new_symbol.GetName() ) );
|
||||
LoadSymbol( symbolName, libraryName, m_unit );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -197,11 +197,11 @@ TOOL_ACTION EE_ACTIONS::renameSymbol( TOOL_ACTION_ARGS()
|
|||
.Tooltip( _( "Rename the selected symbol" ) )
|
||||
.Icon( BITMAPS::edit ) );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::saveSymbolAs( TOOL_ACTION_ARGS()
|
||||
.Name( "eeschema.SymbolLibraryControl.saveSymbolAs" )
|
||||
TOOL_ACTION EE_ACTIONS::saveSymbolCopyAs( TOOL_ACTION_ARGS()
|
||||
.Name( "eeschema.SymbolLibraryControl.saveSymbolCopyAs" )
|
||||
.Scope( AS_GLOBAL )
|
||||
.FriendlyName( _( "Save As..." ) )
|
||||
.Tooltip( _( "Save the current symbol to a different library." ) )
|
||||
.FriendlyName( _( "Save Copy As..." ) )
|
||||
.Tooltip( _( "Save a copy of the current symbol to a different library." ) )
|
||||
.Icon( BITMAPS::save_as ) );
|
||||
|
||||
TOOL_ACTION EE_ACTIONS::deleteSymbol( TOOL_ACTION_ARGS()
|
||||
|
|
|
@ -196,7 +196,7 @@ public:
|
|||
|
||||
// Library management
|
||||
static TOOL_ACTION saveLibraryAs;
|
||||
static TOOL_ACTION saveSymbolAs;
|
||||
static TOOL_ACTION saveSymbolCopyAs;
|
||||
static TOOL_ACTION newSymbol;
|
||||
static TOOL_ACTION deriveFromExistingSymbol;
|
||||
static TOOL_ACTION editSymbol;
|
||||
|
|
|
@ -107,7 +107,7 @@ bool SYMBOL_EDITOR_CONTROL::Init()
|
|||
ctxMenu.AddSeparator();
|
||||
ctxMenu.AddItem( ACTIONS::save, symbolSelectedCondition || libInferredCondition );
|
||||
ctxMenu.AddItem( EE_ACTIONS::saveLibraryAs, libSelectedCondition );
|
||||
ctxMenu.AddItem( EE_ACTIONS::saveSymbolAs, saveSymbolAsCondition );
|
||||
ctxMenu.AddItem( EE_ACTIONS::saveSymbolCopyAs, saveSymbolAsCondition );
|
||||
ctxMenu.AddItem( ACTIONS::revert, symbolSelectedCondition || libInferredCondition );
|
||||
|
||||
ctxMenu.AddSeparator();
|
||||
|
@ -218,8 +218,8 @@ int SYMBOL_EDITOR_CONTROL::Save( const TOOL_EVENT& aEvt )
|
|||
editFrame->Save();
|
||||
else if( aEvt.IsAction( &EE_ACTIONS::saveLibraryAs ) )
|
||||
editFrame->SaveLibraryAs();
|
||||
else if( aEvt.IsAction( &EE_ACTIONS::saveSymbolAs ) )
|
||||
editFrame->SaveSymbolAs();
|
||||
else if( aEvt.IsAction( &EE_ACTIONS::saveSymbolCopyAs ) )
|
||||
editFrame->SaveSymbolCopyAs();
|
||||
else if( aEvt.IsAction( &EE_ACTIONS::saveAll ) )
|
||||
editFrame->SaveAll();
|
||||
}
|
||||
|
@ -722,7 +722,7 @@ void SYMBOL_EDITOR_CONTROL::setTransitions()
|
|||
|
||||
Go( &SYMBOL_EDITOR_CONTROL::Save, ACTIONS::save.MakeEvent() );
|
||||
Go( &SYMBOL_EDITOR_CONTROL::Save, EE_ACTIONS::saveLibraryAs.MakeEvent() );
|
||||
Go( &SYMBOL_EDITOR_CONTROL::Save, EE_ACTIONS::saveSymbolAs.MakeEvent() );
|
||||
Go( &SYMBOL_EDITOR_CONTROL::Save, EE_ACTIONS::saveSymbolCopyAs.MakeEvent() );
|
||||
Go( &SYMBOL_EDITOR_CONTROL::Save, ACTIONS::saveAll.MakeEvent() );
|
||||
Go( &SYMBOL_EDITOR_CONTROL::Revert, ACTIONS::revert.MakeEvent() );
|
||||
|
||||
|
|
Loading…
Reference in New Issue