Skip to content

Commit

Permalink
Have slider only return valid values and 0 if it's hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Feb 19, 2016
1 parent dba8800 commit 925b278
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ public void setSliderParameters(int min, int max, int stepsize) {
}

public int getValue() {
return currentValue;
if(isHidden()) {
return 0;
}
return Math.min(maxValue, Math.max(minValue, currentValue));
}

public void setEnabled(boolean enabled) {
Expand Down

0 comments on commit 925b278

Please sign in to comment.