From 415fb2989d00ca40530657b8d5d2b2cffc3dcae0 Mon Sep 17 00:00:00 2001 From: Stone Li Date: Tue, 11 Apr 2023 21:13:44 +0800 Subject: [PATCH] ENH: modify Support W/G display name Change-Id: I8fbdea4411073a74df804cbcc466027b1c3e941f Signed-off-by: Stone Li --- src/libslic3r/PrintConfig.cpp | 22 ++++++++++++++++------ src/slic3r/GUI/DeviceManager.cpp | 10 +++++++--- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 4049efa91..43a35eeca 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -4264,24 +4264,34 @@ std::string DynamicPrintConfig::get_filament_type(std::string &displayed_filamen if (is_support) { if (filament_id) { if (filament_id->get_at(id) == "GFS00") { - displayed_filament_type = "Support W"; + displayed_filament_type = "Sup.PLA"; return "PLA-S"; } else if (filament_id->get_at(id) == "GFS01") { - displayed_filament_type = "Support G"; + displayed_filament_type = "Sup.PA"; return "PA-S"; } else { - displayed_filament_type = filament_type->get_at(id); - return filament_type->get_at(id); + if (filament_type->get_at(id) == "PLA") { + displayed_filament_type = "Sup.PLA"; + return "PLA-S"; + } + else if (filament_type->get_at(id) == "PA") { + displayed_filament_type = "Sup.PA"; + return "PA-S"; + } + else { + displayed_filament_type = filament_type->get_at(id); + return filament_type->get_at(id); + } } } else { if (filament_type->get_at(id) == "PLA") { - displayed_filament_type = "Support W"; + displayed_filament_type = "Sup.PLA"; return "PLA-S"; } else if (filament_type->get_at(id) == "PA") { - displayed_filament_type = "Support G"; + displayed_filament_type = "Sup.PA"; return "PA-S"; } else { displayed_filament_type = filament_type->get_at(id); diff --git a/src/slic3r/GUI/DeviceManager.cpp b/src/slic3r/GUI/DeviceManager.cpp index 979121d66..4ac30cdbc 100644 --- a/src/slic3r/GUI/DeviceManager.cpp +++ b/src/slic3r/GUI/DeviceManager.cpp @@ -186,9 +186,9 @@ bool AmsTray::is_unset_third_filament() std::string AmsTray::get_display_filament_type() { if (type == "PLA-S") - return "Support W"; + return "Sup.PLA"; else if (type == "PA-S") - return "Support G"; + return "Sup.PA"; else return type; return type; @@ -196,7 +196,11 @@ std::string AmsTray::get_display_filament_type() std::string AmsTray::get_filament_type() { - if (type == "Support W") { + if (type == "Sup.PLA") { + return "PLA-S"; + } else if (type == "Sup.PA") { + return "PA-S"; + } else if (type == "Support W") { return "PLA-S"; } else if (type == "Support G") { return "PA-S";