diff options
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r-- | src/slic3r/GUI/GCodeViewer.cpp | 10 | ||||
-rw-r--r-- | src/slic3r/GUI/GCodeViewer.hpp | 8 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 06370de6e..52c1bf929 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -2040,6 +2040,16 @@ void GCodeViewer::load_toolpaths(const GCodeProcessorResult& gcode_result) sort_remove_duplicates(m_extruder_ids); m_extruder_ids.shrink_to_fit(); +#if ENABLE_SPIRAL_VASE_LAYERS + // replace layers for spiral vase mode + if (!gcode_result.spiral_vase_layers.empty()) { + m_layers.reset(); + for (const auto& layer : gcode_result.spiral_vase_layers) { + m_layers.append(layer.first, { layer.second.first, layer.second.second }); + } + } +#endif // ENABLE_SPIRAL_VASE_LAYERS + // set layers z range if (!m_layers.empty()) m_layers_z_range = { 0, static_cast<unsigned int>(m_layers.size() - 1) }; diff --git a/src/slic3r/GUI/GCodeViewer.hpp b/src/slic3r/GUI/GCodeViewer.hpp index c56e88c88..a67208f10 100644 --- a/src/slic3r/GUI/GCodeViewer.hpp +++ b/src/slic3r/GUI/GCodeViewer.hpp @@ -448,9 +448,8 @@ class GCodeViewer size_t first{ 0 }; size_t last{ 0 }; - bool operator == (const Endpoints& other) const { - return first == other.first && last == other.last; - } + bool operator == (const Endpoints& other) const { return first == other.first && last == other.last; } + bool operator != (const Endpoints& other) const { return !operator==(other); } }; private: @@ -479,9 +478,8 @@ class GCodeViewer bool operator != (const Layers& other) const { if (m_zs != other.m_zs) return true; - if (!(m_endpoints == other.m_endpoints)) + if (m_endpoints != other.m_endpoints) return true; - return false; } }; |