FIX:add interface line draft

jira:[STUDIO-13716][STUDIO-13717]

Change-Id: Ib8a4d919ebfab85e07b80e60c80e9271013d05b9
(cherry picked from commit cf3c37abc2629165bfcdb1eee5b00567acde3c83)
This commit is contained in:
milk
2025-08-17 20:58:19 +08:00
committed by Noisyfox
parent 2eb607bf2c
commit 72a64d7966
23 changed files with 77 additions and 1000 deletions

View File

@@ -330,18 +330,22 @@ std::string MachineObject::get_printer_thumbnail_img_str() const
std::string img_str = DevPrinterConfigUtil::get_printer_thumbnail_img(printer_type);
std::string img_url;
if (!img_str.empty()) {
img_url = Slic3r::resources_dir() + "\\printers\\image\\" + img_str;
if (fs::exists(img_url + ".svg")) {
if (!img_str.empty())
{
img_url = Slic3r::resources_dir() + "\\images\\" + img_str ;
if (fs::exists(img_url + ".svg"))
{
return img_url;
}
else {
else
{
img_url = img_str;
}
}
else {
}
else
{
img_url = "printer_thumbnail";
}
}
return img_url;
}
@@ -4151,7 +4155,7 @@ int MachineObject::parse_json(std::string tunnel, std::string payload, bool key_
}
catch (...) { }
}
if (check_studio_cmd && j["upgrade"].contains("err_code")) {
if (j["upgrade"]["err_code"].is_number()) {
add_command_error_code_dlg(j["upgrade"]["err_code"].get<int>());