diff --git a/src/slic3r/GUI/HMS.cpp b/src/slic3r/GUI/HMS.cpp index e5fc020a3f..989c631bfd 100644 --- a/src/slic3r/GUI/HMS.cpp +++ b/src/slic3r/GUI/HMS.cpp @@ -188,6 +188,7 @@ wxString HMSQuery::query_error_msg(std::string error_code) } } else { + BOOST_LOG_TRIVIAL(info) << "device_error is not exists"; return wxEmptyString; } return wxEmptyString; diff --git a/src/slic3r/GUI/HMSPanel.cpp b/src/slic3r/GUI/HMSPanel.cpp index ab5ea78a67..944b0a3a94 100644 --- a/src/slic3r/GUI/HMSPanel.cpp +++ b/src/slic3r/GUI/HMSPanel.cpp @@ -153,7 +153,8 @@ void HMSPanel::append_hms_panel(HMSItem& item) { m_top_sizer->Add(m_notify_item, 0, wxALIGN_CENTER_HORIZONTAL); else { // debug for hms display error info - m_top_sizer->Add(m_notify_item, 0, wxALIGN_CENTER_HORIZONTAL); + // m_top_sizer->Add(m_notify_item, 0, wxALIGN_CENTER_HORIZONTAL); + BOOST_LOG_TRIVIAL(info) << "hms: do not display empty_item"; } } diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index faa2c0be30..aeb5b3371b 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -1407,15 +1407,21 @@ void StatusPanel::update_error_message() if (print_error_str.size() > 4) { print_error_str.insert(4, " "); } - wxString error_msg = wxString::Format("%s[%s]", - wxGetApp().get_hms_query()->query_print_error_msg(obj->print_error), - print_error_str); - show_error_message(error_msg); - //hint dialog - BOOST_LOG_TRIVIAL(info) << "Print error! " << error_msg; - SecondaryCheckDialog print_error_dlg(this->GetParent(), wxID_ANY, _L("Warning"), SecondaryCheckDialog::ButtonStyle::ONLY_CONFIRM); - print_error_dlg.update_text(error_msg); - print_error_dlg.ShowModal(); + + wxString error_msg = wxGetApp().get_hms_query()->query_print_error_msg(obj->print_error); + if (!error_msg.IsEmpty()) { + error_msg = wxString::Format("%s[%s]", + error_msg, + print_error_str); + show_error_message(error_msg); + + BOOST_LOG_TRIVIAL(info) << "show print error! error_msg = " << error_msg; + SecondaryCheckDialog print_error_dlg(this->GetParent(), wxID_ANY, _L("Warning"), SecondaryCheckDialog::ButtonStyle::ONLY_CONFIRM); + print_error_dlg.update_text(error_msg); + print_error_dlg.ShowModal(); + } else { + BOOST_LOG_TRIVIAL(info) << "show print error! error_msg is empty, print error = " << obj->print_error; + } } } }