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:
Diffstat (limited to 'src/slic3r/GUI/GalleryDialog.cpp')
-rw-r--r--src/slic3r/GUI/GalleryDialog.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/slic3r/GUI/GalleryDialog.cpp b/src/slic3r/GUI/GalleryDialog.cpp
index 2aba75fba..1191e5c2e 100644
--- a/src/slic3r/GUI/GalleryDialog.cpp
+++ b/src/slic3r/GUI/GalleryDialog.cpp
@@ -26,10 +26,10 @@
#include "3DScene.hpp"
#include "GLCanvas3D.hpp"
#include "Plater.hpp"
-#include "3DBed.hpp"
#include "MsgDialog.hpp"
#include "libslic3r/Utils.hpp"
#include "libslic3r/AppConfig.hpp"
+#include "libslic3r/BuildVolume.hpp"
#include "libslic3r/Model.hpp"
#include "libslic3r/GCode/ThumbnailData.hpp"
#include "libslic3r/Format/OBJ.hpp"
@@ -270,9 +270,7 @@ static void generate_thumbnail_from_model(const std::string& filename)
model.objects[0]->center_around_origin(false);
model.objects[0]->ensure_on_bed(false);
- const Vec3d bed_center_3d = wxGetApp().plater()->get_bed().get_bounding_box(false).center();
- const Vec2d bed_center_2d = { bed_center_3d.x(), bed_center_3d.y()};
- model.center_instances_around_point(bed_center_2d);
+ model.center_instances_around_point(to_2d(wxGetApp().plater()->build_volume().bounding_volume().center()));
GLVolumeCollection volumes;
volumes.volumes.push_back(new GLVolume());