Don't remove IS_MOVED flag too early.
Fixes https://gitlab.com/kicad/code/kicad/issues/8056
This commit is contained in:
parent
c32932a311
commit
0561ce903e
|
@ -119,15 +119,16 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||
auto addSymbol =
|
||||
[&]( SCH_COMPONENT* aSymbol )
|
||||
{
|
||||
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
|
||||
|
||||
aSymbol->SetParent( m_frame->GetScreen() );
|
||||
aSymbol->SetFlags( IS_NEW | IS_MOVED );
|
||||
|
||||
m_frame->SaveCopyForRepeatItem( aSymbol );
|
||||
|
||||
m_frame->AddItemToScreenAndUndoList( m_frame->GetScreen(), aSymbol, false );
|
||||
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
|
||||
m_selectionTool->AddItemToSel( aSymbol );
|
||||
|
||||
aSymbol->SetParent( m_frame->GetScreen() );
|
||||
aSymbol->SetFlags( IS_NEW );
|
||||
m_frame->AddItemToScreenAndUndoList( m_frame->GetScreen(), aSymbol, false );
|
||||
|
||||
aSymbol->SetFlags( IS_MOVED );
|
||||
m_toolMgr->RunAction( ACTIONS::refreshPreview );
|
||||
};
|
||||
|
||||
|
@ -229,17 +230,19 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
else
|
||||
{
|
||||
SCH_COMPONENT* nextSymbol = nullptr;
|
||||
|
||||
if( m_frame->eeconfig()->m_AutoplaceFields.enable )
|
||||
symbol->AutoplaceFields( /* aScreen */ NULL, /* aManual */ false );
|
||||
|
||||
symbol->ClearEditFlags();
|
||||
|
||||
m_toolMgr->RunAction( EE_ACTIONS::addNeededJunctions, true,
|
||||
&m_selectionTool->GetSelection() );
|
||||
|
||||
m_view->Update( symbol );
|
||||
m_frame->OnModify();
|
||||
|
||||
SCH_COMPONENT* nextSymbol = nullptr;
|
||||
|
||||
if( m_frame->eeconfig()->m_SymChooserPanel.place_all_units
|
||||
|| m_frame->eeconfig()->m_SymChooserPanel.keep_symbol )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue