From a37dbd6f1dc2225cc98109494d53cf4df27eff8b Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Wed, 14 May 2025 10:01:48 +0800 Subject: [PATCH] FIX:update_badge_according_flag should check compatible machine jira: STUDIO-12166 Change-Id: Id19d398fd2159ee916d0ac63691530ba6d746cdd (cherry picked from commit fa642e8d6673aba65ac363a92b40312242813509) --- src/slic3r/GUI/Plater.cpp | 8 +++++--- src/slic3r/GUI/Plater.hpp | 2 +- src/slic3r/GUI/PresetComboBoxes.cpp | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index d5aace6f08..9ccd38f885 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -15800,7 +15800,7 @@ void Plater::pop_warning_and_go_to_device_page(wxString printer_name, PrinterWar } } -bool Plater::is_same_printer_for_connected_and_selected() +bool Plater::is_same_printer_for_connected_and_selected(bool popup_warning) { MachineObject *obj = wxGetApp().getDeviceManager()->get_selected_machine(); if (obj == nullptr) { @@ -15813,8 +15813,10 @@ bool Plater::is_same_printer_for_connected_and_selected() return false; if (wxGetApp().is_blocking_printing()) { - auto printer_name = get_selected_printer_name_in_combox(); // wxString(obj->get_preset_printer_model_name(machine_print_name)) - pop_warning_and_go_to_device_page(printer_name, PrinterWarningType::INCONSISTENT, _L("Synchronize AMS Filament Information")); + if (popup_warning) { + auto printer_name = get_selected_printer_name_in_combox(); // wxString(obj->get_preset_printer_model_name(machine_print_name)) + pop_warning_and_go_to_device_page(printer_name, PrinterWarningType::INCONSISTENT, _L("Synchronize AMS Filament Information")); + } return false; } return true; diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index c5c5ae46fc..91c02552cd 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -571,7 +571,7 @@ public: }; void pop_warning_and_go_to_device_page(wxString printer_name, PrinterWarningType type, const wxString &title); bool check_printer_initialized(MachineObject *obj, bool only_warning = false); - bool is_same_printer_for_connected_and_selected(); + bool is_same_printer_for_connected_and_selected(bool popup_warning = true); // BBS //void show_action_buttons(const bool is_ready_to_slice) const; diff --git a/src/slic3r/GUI/PresetComboBoxes.cpp b/src/slic3r/GUI/PresetComboBoxes.cpp index dea75e9c04..b75e84c534 100644 --- a/src/slic3r/GUI/PresetComboBoxes.cpp +++ b/src/slic3r/GUI/PresetComboBoxes.cpp @@ -1342,7 +1342,9 @@ void PlaterPresetComboBox::update() update_selection(); if (m_type == Preset::TYPE_FILAMENT) { - update_badge_according_flag(); + if (wxGetApp().plater()->is_same_printer_for_connected_and_selected(false)) { + update_badge_according_flag(); + } } Thaw();