fix: slot assignment dialog matches PLA Silk, Matte PLA etc. to PLA slots #64

Merged
viewit merged 1 commits from p2l/KX-Bridge-Release:feature/slot-assignment-fix into master 2026-06-21 21:40:28 +02:00

1 Commits

Author SHA1 Message Date
Phil Merricks
d7f4983d0d fix: slot assignment dialog now matches "PLA Silk", "Matte PLA" etc. to PLA slots
_normalizeMaterialKey now scans all space-separated words in a slot label and
returns the first known base material type found. This handles both "modifier
first" ("Matte PLA") and "modifier last" ("PLA Silk", "PLA Matte") patterns,
which arise when users label slots with full product-style names while OrcaSlicer
writes only the base type (PLA, PETG, …) in GCode comments.

Dash-suffix composites ("PLA-CF", "PETG-CF") contain no space and are unchanged,
preserving correct incompatibility with their base types.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 20:47:45 +01:00