Support synchronous move in symbol editor.
Also removes duplicate-during-move. It's not really compatibile with a passed-in SCH_COMMIT, and it was never clear it was worth the code. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14274
This commit is contained in:
@@ -407,6 +407,7 @@ void SCH_COMMIT::revertLibEdit()
|
||||
// Symbol editor just saves copies of the whole symbol, so grab the first and discard the rest
|
||||
SYMBOL_EDIT_FRAME* frame = dynamic_cast<SYMBOL_EDIT_FRAME*>( m_toolMgr->GetToolHolder() );
|
||||
LIB_SYMBOL* copy = dynamic_cast<LIB_SYMBOL*>( m_changes.front().m_copy );
|
||||
EE_SELECTION_TOOL* selTool = m_toolMgr->GetTool<EE_SELECTION_TOOL>();
|
||||
|
||||
if( frame && copy )
|
||||
{
|
||||
@@ -417,6 +418,9 @@ void SCH_COMMIT::revertLibEdit()
|
||||
for( size_t ii = 1; ii < m_changes.size(); ++ii )
|
||||
delete m_changes[ii].m_copy;
|
||||
|
||||
if( selTool )
|
||||
selTool->RebuildSelection();
|
||||
|
||||
clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user