diff --git a/src/slic3r/GUI/PrePrintChecker.cpp b/src/slic3r/GUI/PrePrintChecker.cpp index b31f580221..f3b3adb3af 100644 --- a/src/slic3r/GUI/PrePrintChecker.cpp +++ b/src/slic3r/GUI/PrePrintChecker.cpp @@ -191,11 +191,11 @@ static wxColour _GetLabelColour(const prePrintInfo& info) return *wxBLACK; // Default colour for normal messages } -void PrinterMsgPanel::UpdateInfos(const std::vector& infos) +bool PrinterMsgPanel::UpdateInfos(const std::vector& infos) { if (m_infos == infos) { - return; + return false; } m_infos = infos; @@ -229,7 +229,10 @@ void PrinterMsgPanel::UpdateInfos(const std::vector& infos) this->Show(); this->Layout(); + Fit(); + + return true; } diff --git a/src/slic3r/GUI/PrePrintChecker.hpp b/src/slic3r/GUI/PrePrintChecker.hpp index 01ff37ac6f..f2a67df341 100644 --- a/src/slic3r/GUI/PrePrintChecker.hpp +++ b/src/slic3r/GUI/PrePrintChecker.hpp @@ -173,7 +173,7 @@ public: PrinterMsgPanel(wxWindow *parent); public: - void UpdateInfos(const std::vector& infos); + bool UpdateInfos(const std::vector& infos); private: wxBoxSizer* m_sizer = nullptr; diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 930cf75e47..8849a7d0d8 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -1422,8 +1422,12 @@ void SelectMachineDialog::prepare(int print_plate_idx) void SelectMachineDialog::update_print_status_msg() { - m_statictext_ams_msg->UpdateInfos(m_pre_print_checker.filamentList); - m_text_printer_msg->UpdateInfos(m_pre_print_checker.printerList); + bool is_ams_update = m_statictext_ams_msg->UpdateInfos(m_pre_print_checker.filamentList); + bool is_printer_update = m_text_printer_msg->UpdateInfos(m_pre_print_checker.printerList); + if (is_printer_update || is_ams_update) { + Layout(); + } + } void SelectMachineDialog::update_print_error_info(int code, std::string msg, std::string extra)