Fix of changing the order of volumes of a multi-volume part:

The 3D preview scene was not updated properly.
This commit is contained in:
bubnikv 2017-06-21 14:10:22 +02:00
parent 7ca02bda0f
commit b12e4689e8
2 changed files with 20 additions and 0 deletions

View file

@ -90,6 +90,24 @@
void render_legacy() const;
void finalize_geometry(bool use_VBOs);
void release_geometry();
bool move_volume_up(int idx)
%code%{
if (idx > 0 && idx < int(THIS->volumes.size())) {
std::swap(THIS->volumes[idx-1], THIS->volumes[idx]);
RETVAL = true;
} else
RETVAL = false;
%};
bool move_volume_down(int idx)
%code%{
if (idx >= 0 && idx + 1 < int(THIS->volumes.size())) {
std::swap(THIS->volumes[idx+1], THIS->volumes[idx]);
RETVAL = true;
} else
RETVAL = false;
%};
%{
SV*