diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 53775d099b..99f2fc0c60 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -4585,6 +4585,7 @@ void MachineObject::update_model_task() request_model_result++; BOOST_LOG_TRIVIAL(info) << "request times: " << request_model_result << " http code: " << http_code; rating_info = new RatingInfo(); + rating_info->http_code = http_code; if (0 == res && 200 == http_code) { try { json rating_json = json::parse(rating_result); diff --git a/src/slic3r/GUI/DeviceManager.hpp b/src/slic3r/GUI/DeviceManager.hpp index aece0eb044..56c9aa89a7 100644 --- a/src/slic3r/GUI/DeviceManager.hpp +++ b/src/slic3r/GUI/DeviceManager.hpp @@ -181,6 +181,7 @@ enum ManualPaCaliMethod { struct RatingInfo { bool request_successful; + int http_code; int rating_id; int start_count; bool success_printed; diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index c2fd9d62ba..b7cab4edcc 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -2767,6 +2767,7 @@ void StatusPanel::update_subtask(MachineObject *obj) } else if (obj->is_in_printing() || obj->print_status == "FINISH") { if (obj->is_in_prepare() || obj->print_status == "SLICING") { m_project_task_panel->market_scoring_hide(); + m_project_task_panel->get_request_failed_panel()->Hide(); m_project_task_panel->enable_abort_button(false); m_project_task_panel->enable_pause_resume_button(false, "pause_disable"); wxString prepare_text; @@ -2836,8 +2837,13 @@ void StatusPanel::update_subtask(MachineObject *obj) m_project_task_panel->market_scoring_show(); } else if (obj && obj->rating_info && !obj->rating_info->request_successful) { BOOST_LOG_TRIVIAL(info) << "model mall result request failed"; - m_project_task_panel->get_market_retry_buttom()->Enable(!obj->get_model_mall_result_need_retry); - m_project_task_panel->get_request_failed_panel()->Show(); + if (403 != obj->rating_info->http_code) { + BOOST_LOG_TRIVIAL(info) << "Request need retry"; + m_project_task_panel->get_market_retry_buttom()->Enable(!obj->get_model_mall_result_need_retry); + m_project_task_panel->get_request_failed_panel()->Show(); + } else { + BOOST_LOG_TRIVIAL(info) << "Request rejected"; + } } } else { m_project_task_panel->market_scoring_hide(); @@ -2948,6 +2954,7 @@ void StatusPanel::reset_printing_values() m_project_task_panel->market_scoring_hide(); + m_project_task_panel->get_request_failed_panel()->Hide(); update_basic_print_data(false); m_project_task_panel->update_left_time(NA_STR); m_project_task_panel->update_layers_num(true, wxString::Format(_L("Layer: %s"), NA_STR));