From 2009a3f892348ab3500e271e3978314a5e68b8c3 Mon Sep 17 00:00:00 2001 From: copilot Date: Sat, 7 Nov 2026 18:08:27 +0100 Subject: [PATCH] Fix group move drift from stale draw-cache members Group expand left sibling objects in the BVH cache, so transforms moved only the selection draw while cached surfaces stayed put. Co-authored-by: Cursor --- src/DrawingProgram/DrawingProgramSelection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DrawingProgram/DrawingProgramSelection.cpp b/src/DrawingProgram/DrawingProgramSelection.cpp index 00d20c6..c9a3595 100644 --- a/src/DrawingProgram/DrawingProgramSelection.cpp +++ b/src/DrawingProgram/DrawingProgramSelection.cpp @@ -364,6 +364,10 @@ void DrawingProgramSelection::expand_selection_with_groups() { for(auto* c : drawP.layerMan.get_flattened_component_list()) { if(c->obj->groupId != 0 && groupIds.contains(c->obj->groupId) && !already.contains(c) && drawP.layerMan.can_current_peer_edit_layer(c->obj->parentLayer)) { + // Same as click/lasso select: must leave the draw cache, otherwise + // transforms move the selection draw while the BVH surface stays put + // (looks like size-dependent drift between group members). + drawP.drawCache.erase_component(c); selectedSet.push_back(c); already.insert(c); }