FIX: auto-calculate flushing volumes

JIRA: STUDIO-6547
FIX the first modification of consumable color after synchronizing filaments, without automatically calculating the flushing volumes

Signed-off-by: Kunlong Ma <kunlong.ma@bambulab.com>
Change-Id: I2bc76a29afde5241d100cc42a5161db0f9b901c4
This commit is contained in:
Kunlong Ma 2024-03-18 17:32:57 +08:00 committed by Lane.Wei
parent 97d2edbed6
commit 61c7b41cca
2 changed files with 7 additions and 3 deletions

View File

@ -7028,13 +7028,14 @@ void Plater::priv::on_filament_color_changed(wxCommandEvent &event)
//q->update_all_plate_thumbnails(true); //q->update_all_plate_thumbnails(true);
//q->get_preview_canvas3D()->update_plate_thumbnails(); //q->get_preview_canvas3D()->update_plate_thumbnails();
int modify_id = event.GetInt(); int modify_id = event.GetInt();
if (wxGetApp().app_config->get("auto_calculate") == "true") {
sidebar->auto_calc_flushing_volumes(modify_id);
}
auto& ams_multi_color_filment = wxGetApp().preset_bundle->ams_multi_color_filment; auto& ams_multi_color_filment = wxGetApp().preset_bundle->ams_multi_color_filment;
if (modify_id >= 0 && modify_id < ams_multi_color_filment.size()) if (modify_id >= 0 && modify_id < ams_multi_color_filment.size())
ams_multi_color_filment[modify_id].clear(); ams_multi_color_filment[modify_id].clear();
if (wxGetApp().app_config->get("auto_calculate") == "true") {
sidebar->auto_calc_flushing_volumes(modify_id);
}
} }
void Plater::priv::install_network_plugin(wxCommandEvent &event) void Plater::priv::install_network_plugin(wxCommandEvent &event)

View File

@ -350,6 +350,9 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector<float>& matrix, con
str = wxString::Format(("%d"), MAX_FLUSH_VALUE); str = wxString::Format(("%d"), MAX_FLUSH_VALUE);
edit_boxes[i][j]->SetValue(str); edit_boxes[i][j]->SetValue(str);
} }
else if (value < 0) {
edit_boxes[i][j]->SetValue(wxString("0"));
}
}); });
auto on_apply_text_modify = [this, i, j](wxEvent &e) { auto on_apply_text_modify = [this, i, j](wxEvent &e) {