From dd08cca05e1e49ca126775d191fd4cfede87a544 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Fri, 10 Oct 2025 09:47:39 +0800 Subject: [PATCH] Make bool option compatible with array input --- src/libslic3r/Config.hpp | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/libslic3r/Config.hpp b/src/libslic3r/Config.hpp index 05f6eb8c1c..40c0fc7c5f 100644 --- a/src/libslic3r/Config.hpp +++ b/src/libslic3r/Config.hpp @@ -1804,14 +1804,23 @@ public: bool deserialize(const std::string &str, bool append = false) override { UNUSED(append); - if (str == "1") { - this->value = true; - return true; - } - if (str == "0") { - this->value = false; - return true; + + // Orca: take the first value if input is an array + std::istringstream is(str); + std::string item_str; + if (std::getline(is, item_str, ',')) { + boost::trim(item_str); + + if (item_str == "1") { + this->value = true; + return true; + } + if (item_str == "0") { + this->value = false; + return true; + } } + return false; }