FIX:update_badge_according_flag should check compatible machine

jira: STUDIO-12166
Change-Id: Id19d398fd2159ee916d0ac63691530ba6d746cdd
This commit is contained in:
zhou.xu 2025-05-14 10:01:48 +08:00 committed by lane.wei
parent ec44b53b26
commit fa642e8d66
3 changed files with 9 additions and 5 deletions

View File

@ -15967,7 +15967,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(); MachineObject *obj = wxGetApp().getDeviceManager()->get_selected_machine();
if (obj == nullptr) { if (obj == nullptr) {
@ -15980,8 +15980,10 @@ bool Plater::is_same_printer_for_connected_and_selected()
return false; return false;
if (wxGetApp().is_blocking_printing()) { if (wxGetApp().is_blocking_printing()) {
auto printer_name = get_selected_printer_name_in_combox(); // wxString(obj->get_preset_printer_model_name(machine_print_name)) if (popup_warning) {
pop_warning_and_go_to_device_page(printer_name, PrinterWarningType::INCONSISTENT, _L("Synchronize AMS Filament Information")); 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 false;
} }
return true; return true;

View File

@ -535,7 +535,7 @@ public:
}; };
void pop_warning_and_go_to_device_page(wxString printer_name, PrinterWarningType type, const wxString &title); 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 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);
bool is_printer_configed_by_BBL(); bool is_printer_configed_by_BBL();
// BBS // BBS
//void show_action_buttons(const bool is_ready_to_slice) const; //void show_action_buttons(const bool is_ready_to_slice) const;

View File

@ -1339,7 +1339,9 @@ void PlaterPresetComboBox::update()
update_selection(); update_selection();
if (m_type == Preset::TYPE_FILAMENT) { 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(); Thaw();