FIX: update while it's print job
jira: [STUDIO-10848] Change-Id: I19c96dce7d48d46bdf4ed7861ab2136644195e34
This commit is contained in:
parent
1abcd64e72
commit
6f527fd6aa
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue