mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 09:16:08 +08:00
Fix finish job
Fix initial position
This commit is contained in:
parent
081a398cee
commit
d624940b7a
@ -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<Vec3d> vertices;
|
||||
vertices.reserve(its.vertices.size());
|
||||
for (const Vec3f &vertex : its.vertices)
|
||||
|
@ -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()) {
|
||||
|
@ -16,6 +16,11 @@ using namespace GUI;
|
||||
//EmbossJob::EmbossJob(): Job(std::make_shared<NotificationProgressIndicator>(wxGetApp().plater()->get_notification_manager())){}
|
||||
EmbossJob::EmbossJob() : Job(std::make_shared<EmbossJob::Progress>()) {}
|
||||
|
||||
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() {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user