Skip to content

Commit

Permalink
ENH: use designTitle when designId > 0
Browse files Browse the repository at this point in the history
JIRA: STUDIO-6072

Change-Id: I8342df053edeab16f930522e099e2eef91e5c5a4
Signed-off-by: Stone Li <[email protected]>
  • Loading branch information
StoneLiBambulab authored and lanewei120 committed Apr 23, 2024
1 parent 60077e8 commit db98556
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/slic3r/GUI/TaskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,16 @@ std::map<std::string, TaskStateInfo> TaskManager::get_task_list(int curr_page, i
BOOST_LOG_TRIVIAL(trace) << "task_manager: get_task_list task count =" << j["hits"].size();
for (auto& hit : j["hits"]) {
TaskStateInfo task_info;
if (hit.contains("title"))
task_info.set_task_name(hit["title"].get<std::string>());
int64_t design_id = 0;
if (hit.contains("designId")) {
design_id = hit["designId"].get<int64_t>();
}
if (design_id > 0 && hit.contains("designTitle")) {
task_info.set_task_name(hit["designTitle"].get<std::string>());
} else {
if (hit.contains("title"))
task_info.set_task_name(hit["title"].get<std::string>());
}
if (hit.contains("deviceName"))
task_info.set_device_name(hit["deviceName"].get<std::string>());
if (hit.contains("deviceId"))
Expand Down

0 comments on commit db98556

Please sign in to comment.