FIX:fixed the model did not consume time info

Change-Id: Iab6d52af62e8bd6ea7f01b73b42d5b61304c10f7
This commit is contained in:
tao wang 2023-06-13 09:47:40 +08:00 committed by Lane.Wei
parent 373152c78a
commit cd58ba0bee
1 changed files with 10 additions and 11 deletions

View File

@ -3772,18 +3772,17 @@ void SelectMachineDialog::set_default_from_sdcard()
reset_ams_material(); reset_ams_material();
// basic info // basic info
auto aprint_stats = m_plater->get_partplate_list().get_current_fff_print().print_statistics(); try {
wxString time; float float_time = std::stof(m_required_data_plate_data_list[m_print_plate_idx]->get_gcode_prediction_str());
PartPlate* plate = m_plater->get_partplate_list().get_curr_plate(); double float_weight = std::stof(m_required_data_plate_data_list[m_print_plate_idx]->get_gcode_weight_str());
if (plate) { wxString time;
if (plate->get_slice_result()) { time = wxString::Format("%s", short_time(get_time_dhms(plate->get_slice_result()->print_statistics.modes[0].time))); } time = wxString::Format("%s", short_time(get_time_dhms(float_time)));
char weight[64];
::sprintf(weight, " %.2f g", float_weight);
m_stext_time->SetLabel(time);
m_stext_weight->SetLabel(weight);
} }
catch (...) {}
char weight[64];
::sprintf(weight, " %.2f g", aprint_stats.total_weight);
m_stext_time->SetLabel(time);
m_stext_weight->SetLabel(weight);
} }
void SelectMachineDialog::update_page_turn_state(bool show) void SelectMachineDialog::update_page_turn_state(bool show)