From 080addbdab1d4675ba456392844cd65c2b04c20d Mon Sep 17 00:00:00 2001 From: thysson2701 Date: Sat, 13 Jun 2026 15:06:17 +0200 Subject: [PATCH] =?UTF-8?q?fix(sync):=20Vendor-Filter=20bei=20User-Presets?= =?UTF-8?q?=20=C3=BCberspringen=20(Issue=20#52)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit filament_id_by_name() verwarf abgeleitete User-Presets, weil filament_vendor vom Vendor-Parent (z.B. Anycubic) statt vom User-Preset (Tinmorry) aufgelöst wird. Der Vendor-Filter wird jetzt nur noch auf System-Presets angewandt; bei User-Presets ist der strikte Namensvergleich ausreichend, sodass der AMS-Sync das korrekte Preset trifft statt aufs Vendor-Preset zurückzufallen. --- src/slic3r/Utils/MoonrakerPrinterAgent.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/slic3r/Utils/MoonrakerPrinterAgent.cpp b/src/slic3r/Utils/MoonrakerPrinterAgent.cpp index f33886b3c5e..049c6f46892 100644 --- a/src/slic3r/Utils/MoonrakerPrinterAgent.cpp +++ b/src/slic3r/Utils/MoonrakerPrinterAgent.cpp @@ -193,7 +193,13 @@ std::string filament_id_by_name(const Slic3r::PresetCollection& filaments, << " filament_id_empty=" << preset.filament_id.empty(); continue; } - if (!normalized_vendor_filters.empty()) { + // Skip the vendor filter for user presets: a preset derived from a + // vendor-specific parent (e.g. "Anycubic PLA Matte @...") resolves + // filament_vendor from the PARENT ("Anycubic"), not from the user + // preset itself ("Tinmorry"), so the filter would wrongly drop it and + // the AMS sync falls back to the vendor preset (Issue #52). The strict + // name match below is discriminating enough for user presets. + if (!preset.is_user() && !normalized_vendor_filters.empty()) { const std::string preset_vendor = normalize_filament_name_for_match(preset.config.opt_string("filament_vendor", 0u)); bool vendor_match = false; for (const auto& vendor_filter : normalized_vendor_filters) {