From 1a73f72d6be880154d186c9166537ca87e86f4af Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Fri, 11 Oct 2024 16:44:12 +0800 Subject: [PATCH] ENH:adjust busy cursor position for job jira: none Change-Id: I76b194ce2ca1669574427109dbb166b229a1f8a0 --- src/slic3r/GUI/Jobs/Job.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/Jobs/Job.cpp b/src/slic3r/GUI/Jobs/Job.cpp index 19c93643a..b3adf7ed0 100644 --- a/src/slic3r/GUI/Jobs/Job.cpp +++ b/src/slic3r/GUI/Jobs/Job.cpp @@ -62,7 +62,6 @@ GUI::Job::Job(std::shared_ptr pri) // to make sure they close, fade out, whathever m_progress->set_progress(m_range); m_progress->set_cancel_callback(); - wxEndBusyCursor(); if (m_worker_error) { m_finalized = true; @@ -86,7 +85,7 @@ GUI::Job::Job(std::shared_ptr pri) finalize(); } - + wxEndBusyCursor(); // dont do finalization again for the same process m_finalized = true; } @@ -96,6 +95,8 @@ GUI::Job::Job(std::shared_ptr pri) void GUI::Job::start() { // Start the job. No effect if the job is already running if (!m_running.load()) { + // Changing cursor to busy + wxBeginBusyCursor(); prepare(); // Save the current status indicatior range and push the new one @@ -110,9 +111,6 @@ void GUI::Job::start() m_finalized = false; m_finalizing = false; - // Changing cursor to busy - wxBeginBusyCursor(); - try { // Execute the job m_worker_error = nullptr; m_thread = create_thread([this] { this->run(m_worker_error); });