From 028326c5b45f5c2ce952373c1447e5d8fcb45879 Mon Sep 17 00:00:00 2001 From: tao wang Date: Mon, 11 Sep 2023 20:06:33 +0800 Subject: [PATCH] ENH:update text in auto refill jira:[STUDIO-4344] Change-Id: Ieb1f40e03fd4a266b768f8b97e28328858fe63cc --- src/slic3r/GUI/AmsMappingPopup.cpp | 17 +++++++++++++++-- src/slic3r/GUI/StatusPanel.cpp | 8 +------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/slic3r/GUI/AmsMappingPopup.cpp b/src/slic3r/GUI/AmsMappingPopup.cpp index de4628ebc0..6445714139 100644 --- a/src/slic3r/GUI/AmsMappingPopup.cpp +++ b/src/slic3r/GUI/AmsMappingPopup.cpp @@ -1163,6 +1163,7 @@ void MappingContainer::doRender(wxDC& dc) AmsReplaceMaterialDialog::AmsReplaceMaterialDialog(wxWindow* parent) : DPIDialog(parent, wxID_ANY, _L("Auto Refill"), wxDefaultPosition, wxDefaultSize, wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX) { + #ifdef __WINDOWS__ SetDoubleBuffered(true); #endif //__WINDOWS__ @@ -1331,8 +1332,20 @@ void AmsReplaceMaterialDialog::update_machine_obj(MachineObject* obj) m_scrollview_groups->SetMinSize(wxSize(FromDIP(400), height)); m_scrollview_groups->SetMaxSize(wxSize(FromDIP(400), height)); } else { - if (label_txt) - label_txt->SetLabelText(_L("There are currently no identical spare consumables available, and automatic replenishment is currently not possible. \n(Currently supporting automatic supply of consumables with the same brand, material type, and color)")); + if (!obj->is_support_filament_backup) { + label_txt->SetLabel(_L("The printer does not currently support auto refill.")); + } + else if (!obj->ams_auto_switch_filament_flag) { + label_txt->SetLabelText(_L("AMS filament backup is not enabled, please enable it in the AMS settings.")); + } + else { + label_txt->SetLabelText(_L("If there are two identical filaments in AMS, AMS filament backup will be enabled. \n(Currently supporting automatic supply of consumables with the same brand, material type, and color)")); + } + + label_txt->SetMinSize(wxSize(FromDIP(380), -1)); + label_txt->SetMaxSize(wxSize(FromDIP(380), -1)); + label_txt->Wrap(FromDIP(380)); + } m_scrollview_groups->Layout(); diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index 4b3f3e9053..3a59e8c7f6 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -2374,13 +2374,7 @@ void StatusPanel::update_ams(MachineObject *obj) m_ams_control->SetAmsModel(ams_mode, ams_mode); show_ams_group(true); - - if (!is_support_filament_backup) { - m_ams_control->show_auto_refill(false); - } - else { - m_ams_control->show_auto_refill(true); - } + m_ams_control->show_auto_refill(true); }