Setup selection when repeating
We need the item to be currently selected when repeating the last symbol insert. This ensures we have a valid selection before starting the move tool and possibly getting odd system behavior from mouse positions Fixes https://gitlab.com/kicad/code/kicad/issues/10619
This commit is contained in:
parent
527e06d989
commit
7642a9db79
|
@ -876,6 +876,7 @@ int SCH_EDIT_TOOL::RepeatDrawItem( const TOOL_EVENT& aEvent )
|
||||||
Mils2iu( cfg->m_Drawing.default_repeat_offset_y ) ) );
|
Mils2iu( cfg->m_Drawing.default_repeat_offset_y ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_toolMgr->RunAction( EE_ACTIONS::addItemToSel, true, newItem );
|
||||||
newItem->SetFlags( IS_NEW );
|
newItem->SetFlags( IS_NEW );
|
||||||
m_frame->AddToScreen( newItem, m_frame->GetScreen() );
|
m_frame->AddToScreen( newItem, m_frame->GetScreen() );
|
||||||
m_frame->SaveCopyInUndoList( m_frame->GetScreen(), newItem, UNDO_REDO::NEWITEM, false );
|
m_frame->SaveCopyInUndoList( m_frame->GetScreen(), newItem, UNDO_REDO::NEWITEM, false );
|
||||||
|
|
|
@ -183,7 +183,10 @@ public:
|
||||||
|
|
||||||
VECTOR2I GetReferencePoint() const
|
VECTOR2I GetReferencePoint() const
|
||||||
{
|
{
|
||||||
return *m_referencePoint;
|
if( m_referencePoint )
|
||||||
|
return *m_referencePoint;
|
||||||
|
else
|
||||||
|
return GetBoundingBox().Centre();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetReferencePoint( const VECTOR2I& aP )
|
void SetReferencePoint( const VECTOR2I& aP )
|
||||||
|
|
Loading…
Reference in New Issue