From 7bb542a75b45775f8831ed4aec158bfd27e0cf58 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Tue, 16 Sep 2025 19:41:28 +0100 Subject: [PATCH] Fix compiling with wxWidgets 3.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wxWidgets 3.3 has stopped defining in global scope all operators including "+" on wx types, causing some string concatenations to fail. All the constants from ImGui used by marker_by_type() are of type wchar_t. Stop returning them as type char. PrusaSlicer-version_2.9.3/src/slic3r/GUI/Search.cpp:253:62: error: no match for ‘operator+’ (operand types are ‘char’ and ‘const std::wstring’ {aka ‘const std::__cxx11::basic_string’}) 253 | return marker_by_type(opt.type, printer_technology) + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ | | | char 254 | opt.category_local + sep + | ~~~~~~~~~~~~~~~~~~ | | | const std::wstring {aka const std::__cxx11::basic_string} --- src/slic3r/GUI/Search.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Search.cpp b/src/slic3r/GUI/Search.cpp index 75de52ba462..d036fcef739 100644 --- a/src/slic3r/GUI/Search.cpp +++ b/src/slic3r/GUI/Search.cpp @@ -38,7 +38,7 @@ using GUI::into_u8; namespace Search { -static char marker_by_type(Preset::Type type, PrinterTechnology pt) +static wchar_t marker_by_type(Preset::Type type, PrinterTechnology pt) { switch(type) { case Preset::TYPE_PRINT: @@ -53,7 +53,7 @@ static char marker_by_type(Preset::Type type, PrinterTechnology pt) case Preset::TYPE_PREFERENCES: return ImGui::PreferencesButton; default: - return ' '; + return L' '; } }