FIX: update while it's print job

jira: [STUDIO-10848]
Change-Id: I19c96dce7d48d46bdf4ed7861ab2136644195e34
This commit is contained in:
xin.zhang 2025-03-13 20:58:18 +08:00 committed by lane.wei
parent 1abcd64e72
commit 6f527fd6aa
3 changed files with 25 additions and 20 deletions

View File

@ -47,7 +47,7 @@ GUI::Job::Job(std::shared_ptr<ProgressIndicator> pri)
Bind(wxEVT_THREAD, [this](const wxThreadEvent &evt) {
if (m_finalizing) return;
if (evt.GetInt() >= 100) { update_percent_finish(); }
if (this->is_print_job() && evt.GetInt() >= 100) { update_percent_finish(); }
auto msg = evt.GetString();
if (!msg.empty() && !m_worker_error)

View File

@ -94,6 +94,10 @@ public:
bool is_running() const { return m_running.load(); }
void cancel() { m_canceled.store(true); }
public:
/*type check*/
virtual bool is_print_job() const { return false; }
};
// Jobs defined inside the group class will be managed so that only one can

View File

@ -55,6 +55,7 @@ protected:
void on_exception(const std::exception_ptr &) override;
public:
PrintJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater, std::string dev_id = "");
virtual bool is_print_job() const override { return true; }
std::string m_project_name;
std::string m_dev_ip;