Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2018-05-18 11:14:47 +0300
committerEnrico Turri <enricoturri@seznam.cz>2018-05-18 11:14:47 +0300
commit0584990b65ccc9304c3511f30f3ceb44331f2f91 (patch)
tree384705598abc9a31334ce7c41f5acb5940c8e662 /xs/src/slic3r
parent5224acad59f7dc02ef9fe99fcc8e2e1432295f83 (diff)
Fixed z layers indices under 3D preview sliders
Diffstat (limited to 'xs/src/slic3r')
-rw-r--r--xs/src/slic3r/GUI/3DScene.cpp4
-rw-r--r--xs/src/slic3r/GUI/3DScene.hpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp
index 0ead76b88..db1737e14 100644
--- a/xs/src/slic3r/GUI/3DScene.cpp
+++ b/xs/src/slic3r/GUI/3DScene.cpp
@@ -760,13 +760,13 @@ void GLVolumeCollection::update_colors_by_extruder(const DynamicPrintConfig* con
}
}
-std::vector<double> GLVolumeCollection::get_current_print_zs() const
+std::vector<double> GLVolumeCollection::get_current_print_zs(bool active_only) const
{
// Collect layer top positions of all volumes.
std::vector<double> print_zs;
for (GLVolume *vol : this->volumes)
{
- if (vol->is_active)
+ if (!active_only || vol->is_active)
append(print_zs, vol->print_zs);
}
std::sort(print_zs.begin(), print_zs.end());
diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp
index fb5d9f14b..a417f5f9d 100644
--- a/xs/src/slic3r/GUI/3DScene.hpp
+++ b/xs/src/slic3r/GUI/3DScene.hpp
@@ -428,7 +428,7 @@ public:
void update_colors_by_extruder(const DynamicPrintConfig* config);
// Returns a vector containing the sorted list of all the print_zs of the volumes contained in this collection
- std::vector<double> get_current_print_zs() const;
+ std::vector<double> get_current_print_zs(bool active_only) const;
private:
GLVolumeCollection(const GLVolumeCollection &other);