Set start item for inline dragging so that snapping works properly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6796
This commit is contained in:
parent
3d852372ca
commit
ac793618f9
|
@ -1500,7 +1500,7 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
startItem = m_router->GetWorld()->FindItemByParent( item );
|
startItem = m_router->GetWorld()->FindItemByParent( item );
|
||||||
|
|
||||||
if( startItem)
|
if( startItem )
|
||||||
itemsToDrag.Add( startItem );
|
itemsToDrag.Add( startItem );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1512,7 +1512,10 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
|
||||||
m_gridHelper->SetSnap( !aEvent.Modifier( MD_SHIFT ) );
|
m_gridHelper->SetSnap( !aEvent.Modifier( MD_SHIFT ) );
|
||||||
|
|
||||||
if( startItem )
|
if( startItem )
|
||||||
|
{
|
||||||
p = snapToItem( startItem, p0 );
|
p = snapToItem( startItem, p0 );
|
||||||
|
m_startItem = startItem;
|
||||||
|
}
|
||||||
|
|
||||||
int dragMode = aEvent.Parameter<int64_t> ();
|
int dragMode = aEvent.Parameter<int64_t> ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue