feat: make filament Serial field optional in CreatePresetsDialog#10873
Open
BenJule wants to merge 2 commits into
Open
feat: make filament Serial field optional in CreatePresetsDialog#10873BenJule wants to merge 2 commits into
BenJule wants to merge 2 commits into
Conversation
## Summary - The **Serial** field (labeled \"Variant\" in the upstream issue) in the *Create Filament Preset* dialog is now optional - Users can leave it blank when a filament has no meaningful variant (e.g. Polymaker PolyLite PC) - The field label now reads **Serial (optional)** to make this clear - When blank, the preset is named `Vendor Type` instead of `Vendor Type ` with a trailing space ## Changes `src/slic3r/GUI/CreatePresetsDialog.cpp` - Removed the hard error when Serial is empty - Relaxed escape-character and all-spaces validation to check only the Vendor field (Serial can legitimately be empty) - Preset name construction skips the serial component when it is empty - Field label changed from `Serial` → `Serial (optional)` ## Test plan - [ ] Create a filament preset with Serial left blank → preset is created as `Vendor Type` - [ ] Create a filament preset with Serial filled in → preset is created as `Vendor Type Serial` (existing behaviour unchanged) - [ ] Vendor field still required: leaving Vendor blank still shows an error Upstream issue: bambulab#10866
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #10866
The filament Serial field in the Create/Edit Filament Presets dialog is currently mandatory — the dialog silently requires a non-empty value to build the preset name. This is confusing for users who want to create a generic filament preset without a specific serial/variant number.
Changes
<Vendor> <Type>instead of<Vendor> <Type> <Serial>remove_special_key()strips everything), the dialog shows a clear validation error instead of silently dropping the value:Before / After
Vendor TypeTesting
Tested the following scenarios:
Vendor Type✓!!!as serial (all special chars) → validation error shown, dialog stays open ✓