Refactor: move Printer dependencies data validation from Preset to Tab #1014

Closed
opened 2026-04-05 16:42:07 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Sabriel-Koh on 1/21/2026

Description

When creating a new filament preset and setting the Printer Dependencies to "All", the preset does not save this setting. This issue only occurs on creation due to code that is meant to validate the data to prevent a case where the filament is compatible with none of the printers.

EDIT: While I considered redoing the data validation for this tab overall, I have now preserved the original purpose of the code, which is to add the current printer as a compatible printer only if:

  • the base preset is a System preset
  • the user has not specified any compatible printers

Notably, this seems to be the cause of #11959

Moving the data validation from Preset::save_current_preset to Tab::save_preset allows the Preset function to be simplified through removal of the current printer parameter.

Screenshots/Recordings/Graphs

There is no visible change on the UI.

Tests

Tested the following combinations of filament presets:

  • System->new User
  • User->new User
  • User->same User

Tried to set them to All, where the System->new User should be the only case where this is replaced by a default.
In any case where there are printers already set, those settings should be kept.

*Originally created by @Sabriel-Koh on 1/21/2026* # Description When creating a new filament preset and setting the Printer Dependencies to "All", the preset does not save this setting. This issue only occurs on creation due to code that is meant to validate the data to prevent a case where the filament is compatible with none of the printers. EDIT: While I considered redoing the data validation for this tab overall, I have now preserved the original purpose of the code, which is to add the current printer as a compatible printer only if: - the base preset is a System preset - the user has not specified any compatible printers Notably, this seems to be the cause of #11959 Moving the data validation from `Preset::save_current_preset` to `Tab::save_preset` allows the Preset function to be simplified through removal of the current printer parameter. # Screenshots/Recordings/Graphs There is no visible change on the UI. ## Tests Tested the following combinations of filament presets: - System->new User - User->new User - User->same User Tried to set them to All, where the System->new User should be the only case where this is replaced by a default. In any case where there are printers already set, those settings should be kept.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#1014