Browse Source

Page Layout: Do not double-move frames

When block selecting and dragging in Page Layout editor, multiple items
with the same parent may be selected.  We do not want to move them twice
or the block will show with misaligned elements when placed.
pull/13/head
Seth Hillbrand 7 years ago
parent
commit
b836f3cefa
  1. 16
      pagelayout_editor/block.cpp

16
pagelayout_editor/block.cpp

@ -226,12 +226,26 @@ void PL_EDITOR_FRAME::Block_Move( wxDC* DC )
// Move items in block
SaveCopyInUndoList();
for( auto item: items )
{
auto parent = item->GetParent();
if( parent )
parent->ClearFlags( FLAG1 );
}
for( auto item: items )
{
if( item->HitTest( screen->m_BlockLocate ) )
{
auto data_item = item->GetParent();
data_item->MoveToUi( data_item->GetStartPosUi() + delta );
if( data_item && !( data_item->GetFlags() & FLAG1 ) )
{
data_item->SetFlags( FLAG1 );
data_item->MoveToUi( data_item->GetStartPosUi() + delta );
}
}
}

Loading…
Cancel
Save