BSlider::SetPosition() now calls BSlider's SetValue().
* Before it directly called the BControl version which doesn't really make any sense, and prevented visual updates.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright 2001-2009, Haiku.
|
||||
* Copyright 2001-2013 Haiku, Inc.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Marc Flerackers ([email protected])
|
||||
* Stephan Aßmus <[email protected]>
|
||||
* Axel Dörfler, [email protected]
|
||||
* Marc Flerackers ([email protected])
|
||||
*/
|
||||
|
||||
|
||||
@@ -758,11 +758,11 @@ void
|
||||
BSlider::SetPosition(float position)
|
||||
{
|
||||
if (position <= 0.0f)
|
||||
BControl::SetValue(fMinValue);
|
||||
SetValue(fMinValue);
|
||||
else if (position >= 1.0f)
|
||||
BControl::SetValue(fMaxValue);
|
||||
SetValue(fMaxValue);
|
||||
else
|
||||
BControl::SetValue((int32)(position * (fMaxValue - fMinValue) + fMinValue));
|
||||
SetValue((int32)(position * (fMaxValue - fMinValue) + fMinValue));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user