From 9f83f6deff66bc0b9a763f630ba393bc5bb9b6bf Mon Sep 17 00:00:00 2001 From: "hu.wang" Date: Mon, 4 Sep 2023 15:54:58 +0800 Subject: [PATCH] ENH:Don't call the interface when task id is incorrect JIRA:STUDIO-4322 Change-Id: I6fc1dc7379cba0702927e30cab0aa271074c59da --- src/slic3r/GUI/DeviceManager.cpp | 5 ++--- src/slic3r/GUI/StatusPanel.cpp | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 5b6f4728e..a6864e724 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -4459,7 +4459,8 @@ void MachineObject::update_slice_info(std::string project_id, std::string profil } if (project_id.compare("0") == 0 - || profile_id.compare("0") == 0) return; + || profile_id.compare("0") == 0 + || subtask_id.compare("0") == 0) return; BOOST_LOG_TRIVIAL(trace) << "slice_info: start"; slice_info = new BBLSliceInfo(); @@ -4471,8 +4472,6 @@ void MachineObject::update_slice_info(std::string project_id, std::string profil if (plate_idx >= 0) { plate_index = plate_idx; } else { - if (subtask_id.compare("0") == 0) - return; std::string subtask_json; unsigned http_code = 0; diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index e59645a77..1f2ac910f 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -2636,7 +2636,9 @@ void StatusPanel::update_model_info() curr_model_task = new BBLModelTask(); curr_model_task->task_id = curr_task->task_id; request_model_info_flag = true; - wxGetApp().getAgent()->get_subtask(curr_model_task, get_subtask_fn); + if (!curr_model_task->task_id.empty() && curr_model_task->task_id.compare("0") != 0) { + wxGetApp().getAgent()->get_subtask(curr_model_task, get_subtask_fn); + } } } }