FIX:add interface line draft

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

Change-Id: Ib8a4d919ebfab85e07b80e60c80e9271013d05b9
(cherry picked from commit cf3c37abc2629165bfcdb1eee5b00567acde3c83)
This commit is contained in:
milk authored and Noisyfox committed 2025-10-03 23:08:55 +08:00
1 parent 2eb607bf2c
commit 72a64d7966
23 files changed
+77 -1000

No files matched your search

+12 -8
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>());