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

Synthesis option slider with int values gets persisted / reloaded as float #23

Closed
NiklasRentzCAU opened this issue Apr 9, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@NiklasRentzCAU
Copy link
Member

When creating a new synthesis option of type range option with only int values as their lower and upper bound, step size and initial value the slider and current option initially works as intended.

 

public static final SynthesisOption DESCRIPTION_LENGTH = SynthesisOption.createRangeOption("Description text length", 0, 500, 1, 20).setCategory(BUNDLE)

 

And only shows int values and also returns an int when the option value is read a synthesis as in 

usedContext.getOptionValue(DESCRIPTION_LENGTH) as Integer

 When Eclipse is closed with an option value such as '42' and re-opened the slider shows the current value as a float '42.0' and also returns that float when read from the context which may cause the synthesis to have unexpected behavior.

Solution: The int-only slider should persist its value as an int if it was an int and not restore it as a float.

@NiklasRentzCAU NiklasRentzCAU added the enhancement New feature or request label Apr 9, 2020
@NiklasRentzCAU
Copy link
Member Author

This issue is migrated from the old KIELER Pragmatics JIRA issue tracker. See the old discussion on this ticket in KIPRA-1968.

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

No branches or pull requests

1 participant