diff --git a/src/slic3r/GUI/CameraUtils.cpp b/src/slic3r/GUI/CameraUtils.cpp index 95842b47d0..29d0c32db1 100644 --- a/src/slic3r/GUI/CameraUtils.cpp +++ b/src/slic3r/GUI/CameraUtils.cpp @@ -41,8 +41,9 @@ Slic3r::Polygon CameraUtils::create_hull2d(const Camera & camera, const GLVolume &volume) { const indexed_triangle_set &its = volume.convex_hull()->its; - const Transform3d &trafoMat = volume.get_instance_transformation() - .get_matrix(); + const Transform3d & trafoMat = + volume.get_instance_transformation().get_matrix() * + volume.get_volume_transformation().get_matrix(); std::vector vertices; vertices.reserve(its.vertices.size()); for (const Vec3f &vertex : its.vertices) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index ef85887cd6..97ce8de7ee 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -336,6 +336,7 @@ void GLGizmoEmboss::on_set_state() remove_notification_not_valid_font(); } else if (GLGizmoBase::m_state == GLGizmoBase::On) { if (!m_is_initialized) initialize(); + set_fine_position(); // When add Text on empty plate, Create new object with volume if (m_parent.get_selection().is_empty()) { diff --git a/src/slic3r/GUI/Jobs/EmbossJob.cpp b/src/slic3r/GUI/Jobs/EmbossJob.cpp index 6b4138ed42..984f2d7c5f 100644 --- a/src/slic3r/GUI/Jobs/EmbossJob.cpp +++ b/src/slic3r/GUI/Jobs/EmbossJob.cpp @@ -16,6 +16,11 @@ using namespace GUI; //EmbossJob::EmbossJob(): Job(std::make_shared(wxGetApp().plater()->get_notification_manager())){} EmbossJob::EmbossJob() : Job(std::make_shared()) {} +EmbossJob::~EmbossJob() { + Job::cancel(); + Job::join(); +} + void EmbossJob::restart(const Data &data) { if (Job::is_running()) { @@ -40,6 +45,7 @@ void EmbossJob::restart(const Data &data) Job::start(); } } + void EmbossJob::prepare() {} void EmbossJob::process() { diff --git a/src/slic3r/GUI/Jobs/EmbossJob.hpp b/src/slic3r/GUI/Jobs/EmbossJob.hpp index 279c4af49a..c88f710cb9 100644 --- a/src/slic3r/GUI/Jobs/EmbossJob.hpp +++ b/src/slic3r/GUI/Jobs/EmbossJob.hpp @@ -33,8 +33,16 @@ public: // when volume_ptr == nullptr && object_idx < 0 than new object will be created int object_idx; }; - EmbossJob(); + EmbossJob(); + ~EmbossJob();// cancel work and join + void restart(const Data &data); + + // do not allow Job::start + bool join(int timeout_ms = 0) { return Job::join(timeout_ms); }; + bool is_running() const { return Job::is_running(); } + void cancel() { Job::cancel(); } + protected: // Launched just before start(), a job can use it to prepare internals virtual void prepare() override;