From 61c7b41ccafd99df58aa53aaea631c450922abad Mon Sep 17 00:00:00 2001 From: Kunlong Ma Date: Mon, 18 Mar 2024 17:32:57 +0800 Subject: [PATCH] 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 Change-Id: I2bc76a29afde5241d100cc42a5161db0f9b901c4 --- src/slic3r/GUI/Plater.cpp | 7 ++++--- src/slic3r/GUI/WipeTowerDialog.cpp | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index b722dcc24..0034d2eb9 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -7028,13 +7028,14 @@ void Plater::priv::on_filament_color_changed(wxCommandEvent &event) //q->update_all_plate_thumbnails(true); //q->get_preview_canvas3D()->update_plate_thumbnails(); 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; if (modify_id >= 0 && modify_id < ams_multi_color_filment.size()) 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) diff --git a/src/slic3r/GUI/WipeTowerDialog.cpp b/src/slic3r/GUI/WipeTowerDialog.cpp index 265ed00ce..ec4fb8300 100644 --- a/src/slic3r/GUI/WipeTowerDialog.cpp +++ b/src/slic3r/GUI/WipeTowerDialog.cpp @@ -350,6 +350,9 @@ WipingPanel::WipingPanel(wxWindow* parent, const std::vector& matrix, con str = wxString::Format(("%d"), MAX_FLUSH_VALUE); 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) {