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:
Seth Hillbrand 2018-11-12 06:50:12 -08:00
parent 62e2fe8bbd
commit c15c64e991
1 changed files with 12 additions and 0 deletions

View File

@ -439,8 +439,14 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
}
for( auto item : selection )
{
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 );
m_cursor = controls->GetCursorPosition();
@ -562,8 +568,14 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true );
for( auto item : selection )
{
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 )
m_commit->Revert();
else