Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a "design default values" parameter set #2479

Merged
merged 4 commits into from
Sep 16, 2018

Conversation

MichaelPFrey
Copy link
Member

  • adding a "design default values" parameter set.
  • Always reset to the "design default values" before applying any preset.
    -> this should prevent various issues like variables from one parameter set being transferred to an other parameter set that those not have the specific parameter has not set.

…design default values" before applying any preset.
@MichaelAtOz
Copy link
Member

Is the default set something that needs to be saved to work?

@MichaelPFrey
Copy link
Member Author

MichaelPFrey commented Sep 8, 2018

MichaelAtOz:

Is the default set something that needs to be saved to work?

It does not need to be saved.
It is just always there on the top of the list of presets [in the List index 0].

The implementation is simple: Set all entries to the default value, then apply the selected preset.

"design default values" [in the List index 0] (feel free to suggest a better name) is not a real preset.
So, it sets all entries to the default value, sees that it is preset index 0 and those nothing.

It pretty much behaves just like an other preset.

There are a few quirks with this implantation:

  • Changes to the scad source code apply to the "design default values" only after "Preview"
    • upps... testing that, I realize that it crashes when I change the scad source file
  • the "reset" button does not work for "design default values" yet

And when I am already on it:

  • at a few comments to explain what each method does (the naming is getting confusing)

well, back to work

@MichaelPFrey
Copy link
Member Author

the crash when changing the scad-design also exists without my changes. But: By providing a "design default values" gets people to try out what happens when they change them, it needs to be fixed.

The current fix is simply to disable the customizer, when the user is changing the design.

This might result in lose of not saved presets, but it is still better then a full on crash.

@kintel kintel merged commit 4024c71 into openscad:master Sep 16, 2018
@MichaelPFrey MichaelPFrey deleted the CustomizerDesignDefault branch September 16, 2018 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants