diff --git a/xs/xsp/GUI_3DScene.xsp b/xs/xsp/GUI_3DScene.xsp index 2a963b16a..13f0d42f2 100644 --- a/xs/xsp/GUI_3DScene.xsp +++ b/xs/xsp/GUI_3DScene.xsp @@ -95,6 +95,9 @@ %code%{ if (idx > 0 && idx < int(THIS->volumes.size())) { std::swap(THIS->volumes[idx-1], THIS->volumes[idx]); + std::swap(THIS->volumes[idx-1]->composite_id, THIS->volumes[idx]->composite_id); + std::swap(THIS->volumes[idx-1]->select_group_id, THIS->volumes[idx]->select_group_id); + std::swap(THIS->volumes[idx-1]->drag_group_id, THIS->volumes[idx]->drag_group_id); RETVAL = true; } else RETVAL = false; @@ -103,6 +106,9 @@ %code%{ if (idx >= 0 && idx + 1 < int(THIS->volumes.size())) { std::swap(THIS->volumes[idx+1], THIS->volumes[idx]); + std::swap(THIS->volumes[idx+1]->composite_id, THIS->volumes[idx]->composite_id); + std::swap(THIS->volumes[idx+1]->select_group_id, THIS->volumes[idx]->select_group_id); + std::swap(THIS->volumes[idx+1]->drag_group_id, THIS->volumes[idx]->drag_group_id); RETVAL = true; } else RETVAL = false;