7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 21:51:40 +00:00

Don't move items inside a group: move the whole group instead

This commit is contained in:
Roberto Fernandez Bautista 2022-09-04 00:49:35 +02:00
parent fa5dc23797
commit 2d203bc975

View File

@ -314,8 +314,13 @@ void BOARD::Move( const VECTOR2I& aMoveVector ) // overload
INSPECTOR_FUNC inspector =
[&] ( EDA_ITEM* item, void* testData )
{
BOARD_ITEM* brdItem = static_cast<BOARD_ITEM*>( item );
// aMoveVector was snapshotted, don't need "data".
static_cast<BOARD_ITEM*>( item )->Move( aMoveVector );
// Only move the top level group
if( brdItem->GetParentGroup() == nullptr )
brdItem->Move( aMoveVector );
return INSPECT_RESULT::CONTINUE;
};