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

Add button to reset parameter default values #17

Open
imagejan opened this issue Sep 30, 2015 · 1 comment
Open

Add button to reset parameter default values #17

imagejan opened this issue Sep 30, 2015 · 1 comment

Comments

@imagejan
Copy link
Member

Currently, the parameter input harvested from @ parameters is remembered between script executions and between separate sessions. While that is useful for repeated executions of the same script, there should be a way to restore the defaults defined by value = someValue in the parameter definition, e.g. by adding a Reset button.

@ctrueden
Copy link
Member

ctrueden commented Oct 5, 2015

The relevant code for a "reset" option to call would be PrefService#clear(Class), where Class is the Java class of the Command implementation to clear.

However, for scripts, that ends up always being ScriptModule. This is actually a big bug! We shouldn't be using the same preferences area for every single script—as things stand, any parameter called e.g. a—regardless of type—will have its value persisted in the same place. I filed scijava/scijava-common#193 to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants