From 88445f98f0fa5812555d040be78a85098504f626 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 13 Nov 2018 18:44:30 +0100 Subject: [PATCH] Fixed forward declaration of enums, made volumes with negative ID directly unselectable. --- src/libslic3r/SLAPrint.hpp | 4 ++-- src/slic3r/GUI/3DScene.hpp | 2 +- src/slic3r/GUI/GLCanvas3D.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/SLAPrint.hpp b/src/libslic3r/SLAPrint.hpp index 668def6a8..94040ce38 100644 --- a/src/libslic3r/SLAPrint.hpp +++ b/src/libslic3r/SLAPrint.hpp @@ -6,13 +6,13 @@ namespace Slic3r { -enum SLAPrintStep { +enum SLAPrintStep : unsigned int { slapsRasterize, slapsValidate, slapsCount }; -enum SLAPrintObjectStep { +enum SLAPrintObjectStep : unsigned int { slaposObjectSlice, slaposSupportIslands, slaposSupportPoints, diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index e611e7f54..9761ba3b6 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -18,7 +18,7 @@ class Print; class PrintObject; class SLAPrint; class SLAPrintObject; -enum SLAPrintObjectStep; +enum SLAPrintObjectStep : unsigned int; class Model; class ModelObject; class GCodePreviewData; diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index f9daa36d0..6d089b5b2 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1220,7 +1220,7 @@ void GLCanvas3D::Selection::add(unsigned int volume_idx, bool as_single_selectio { case Volume: { - if (is_empty() || (volume->instance_idx() == get_instance_idx())) + if (volume->volume_idx() >= 0 && (is_empty() || (volume->instance_idx() == get_instance_idx()))) _add_volume(volume_idx); break;