fix: slot assignment dialog matches PLA Silk, Matte PLA etc. to PLA slots #64
Reference in New Issue
Block a user
No description provided.
Delete Branch "p2l/KX-Bridge-Release:feature/slot-assignment-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The material compatibility check in
openFilamentDialogused exact string matching, so variants like"PLA Silk","PLA-CF","Matte PLA"would not match against a slot loaded with"PLA"and would show "No matching material" instead of being offered the slot.This fix uses a prefix/substring check so any material string that contains or starts with the base type (
PLA,PETG,ABS, etc.) is treated as compatible._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>_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>_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>LGTM
Thanks @p2l — clean fix. The word-scan approach correctly handles all the modifier+base patterns ("Matte PLA", "PLA Silk", "Silk PETG" etc.) without breaking dash-suffix variants like PLA-CF. Merged into master.