Fix group move drift from stale draw-cache members
Some checks failed
Windows Release / windows-x86_64 (push) Has been cancelled

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 <cursoragent@cursor.com>
This commit is contained in:
copilot 2026-11-07 18:08:27 +01:00
parent 8ca22f6c7c
commit 2009a3f892

View file

@ -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);
}