GRID_HELPER: Don't snap to sub elements being moved
Fixes: lp:1802795 * https://bugs.launchpad.net/kicad/+bug/1802795
This commit is contained in:
parent
62e2fe8bbd
commit
c15c64e991
|
@ -439,8 +439,14 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
for( auto item : selection )
|
for( auto item : selection )
|
||||||
|
{
|
||||||
item->SetFlags( IS_DRAGGED ); //todo: flags structure rework
|
item->SetFlags( IS_DRAGGED ); //todo: flags structure rework
|
||||||
|
|
||||||
|
if( auto module = dyn_cast<MODULE*>( item ) )
|
||||||
|
module->RunOnChildren( [&] ( BOARD_ITEM* bitem )
|
||||||
|
{ bitem->SetFlags( IS_DRAGGED ); } );
|
||||||
|
}
|
||||||
|
|
||||||
editFrame->UndoRedoBlock( true );
|
editFrame->UndoRedoBlock( true );
|
||||||
m_cursor = controls->GetCursorPosition();
|
m_cursor = controls->GetCursorPosition();
|
||||||
|
|
||||||
|
@ -562,8 +568,14 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true );
|
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true );
|
||||||
|
|
||||||
for( auto item : selection )
|
for( auto item : selection )
|
||||||
|
{
|
||||||
item->ClearFlags( IS_DRAGGED ); //todo: flags structure rework
|
item->ClearFlags( IS_DRAGGED ); //todo: flags structure rework
|
||||||
|
|
||||||
|
if( auto module = dyn_cast<MODULE*>( item ) )
|
||||||
|
module->RunOnChildren( [&] ( BOARD_ITEM* bitem )
|
||||||
|
{ bitem->SetFlags( IS_DRAGGED ); } );
|
||||||
|
}
|
||||||
|
|
||||||
if( restore_state )
|
if( restore_state )
|
||||||
m_commit->Revert();
|
m_commit->Revert();
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue