Hopefully finally fixed reordering of the multi-material parts.

This commit is contained in:
bubnikv 2017-06-26 16:44:16 +02:00
parent 8160db23cc
commit ab21a253e0

View File

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