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:
Axel Dörfler
2013-02-05 00:23:10 +01:00
parent 0b319bd6f3
commit 0a7975bfed
+5 -5
View File
@@ -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));
}