fix: use raw filament_type in sw_GetFileFilamentMapping to prevent PLA-S remapping#420
Open
kbaker827 wants to merge 1 commit into
Open
Conversation
…g to prevent PLA-S remapping get_filament_type() remaps 'Generic Support For PLA' to 'PLA-S' for display purposes. Using it in sw_GetFileFilamentMapping caused the web UI filament matcher to fail for support filaments because the raw type value was expected. Use filament_type_opt->get_at() directly to read the stored filament type without the display remapping.
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
sw_GetFileFilamentMapping()was callingfull_config.get_filament_type()to populate the filament type list sent to the web UI. That function remaps"Generic Support For PLA"to"PLA-S"for display purposes — but the web UI's filament matcher expects the raw stored value, causing filament matching to fail silently for support filaments.Closes / supersedes #413.
Changes
src/slic3r/GUI/SSWCP.cpp: cachefilament_typeoption pointer; usefilament_type_opt->get_at(i)instead ofget_filament_type()to read the raw stored type without display remappingTest plan
"Support PLA"(or equivalent raw value) rather than"PLA-S"