Issue 349 in pymt: MTCircularSlider with non-default max value returns incorrect value

8 views
Skip to first unread message

py...@googlecode.com

unread,
Nov 22, 2010, 7:42:30 PM11/22/10
to pymt-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 349 by Ghost429: MTCircularSlider with non-default max value
returns incorrect value
http://code.google.com/p/pymt/issues/detail?id=349

What steps will reproduce the problem?
1.Create an MTCircular Slider with a max value > 100
2.Add an on_value_changed func that prints the args value
3.change the value of the slider

What is the expected output? What do you see instead?
Expected: maximum value within the bounds
Actual: maximum value / 100 * max_value can go above the bounds
Example:
Slider_max of 150
At the maximum, _calculate_angle returns 150.
_set_value gets 150, does 150/100 * 150, which = 225
_value is set to 225 and passed to the event function


What version of the product are you using? On what operating system?
0.5.1
Windows XP

Please provide any additional information below.
My fix was to change the line in _set_value from
self._value = value / 100. * self.max
to
self._value = value

Reply all
Reply to author
Forward
0 new messages