FIX: No progress bar is displayed during manual calibration

Jira: 3789
Change-Id: I4d56839136f4590b6df384f2287e9565e5e61afa
(cherry picked from commit ddb0c38fc0ed4b42bc5a132c2b2d907084576d41)
This commit is contained in:
zhimin.zeng 2023-09-01 10:00:58 +08:00 committed by Lane.Wei
parent 50226b8b23
commit 1426913752
3 changed files with 15 additions and 1 deletions

View file

@ -31,7 +31,8 @@ static wxString sending_over_cloud_str = _L("Sending print job through clou
PrintJob::PrintJob(std::shared_ptr<ProgressIndicator> pri, Plater* plater, std::string dev_id)
: PlaterJob{ std::move(pri), plater },
m_dev_id(dev_id)
m_dev_id(dev_id),
m_is_calibration_task(false)
{
m_print_job_completed_id = plater->get_print_finished_event();
}
@ -280,6 +281,11 @@ void PrintJob::process()
if (params.preset_name.empty() && m_print_type == "from_normal") { params.preset_name = wxString::Format("%s_plate_%d", m_project_name, curr_plate_idx).ToStdString(); }
if (params.project_name.empty()) {params.project_name = m_project_name;}
if (m_is_calibration_task) {
params.project_name = m_project_name;
params.origin_model_id = "";
}
wxString error_text;
wxString msg_text;
@ -534,5 +540,9 @@ void PrintJob::connect_to_local_mqtt()
this->update_status(0, wxEmptyString);
}
void PrintJob::set_calibration_task(bool is_calibration)
{
m_is_calibration_task = is_calibration;
}
}} // namespace Slic3r::GUI

View file

@ -63,6 +63,8 @@ public:
std::string m_print_type;
std::string m_dst_path;
bool m_is_calibration_task = false;
int m_print_from_sdc_plate_idx = 0;
bool m_local_use_ssl_for_mqtt { true };
@ -106,6 +108,7 @@ public:
void connect_to_local_mqtt();
wxString get_http_error_msg(unsigned int status, std::string body);
std::string truncate_string(const std::string& str, size_t maxLength);
void set_calibration_task(bool is_calibration);
};

View file

@ -980,6 +980,7 @@ void CalibUtils::send_to_print(const CalibInfo &calib_info, std::string &error_m
CalibMode cali_mode = calib_info.params.mode;
print_job->m_project_name = get_calib_mode_name(cali_mode, flow_ratio_mode);
print_job->set_calibration_task(true);
print_job->has_sdcard = obj_->has_sdcard();
print_job->set_print_config(MachineBedTypeString[bed_type], true, false, false, false, true);