through the methods of chaos programming, I hope I have finally got this right
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15459 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -272,6 +272,14 @@ an actual BView within the scroll bar's window.
|
|||||||
void
|
void
|
||||||
BScrollBar::SetValue(float value)
|
BScrollBar::SetValue(float value)
|
||||||
{
|
{
|
||||||
|
if (value == fValue)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (value > fMax)
|
||||||
|
value = fMax;
|
||||||
|
if (value < fMin)
|
||||||
|
value = fMin;
|
||||||
|
|
||||||
ValueChanged(value);
|
ValueChanged(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -286,14 +294,6 @@ BScrollBar::Value() const
|
|||||||
void
|
void
|
||||||
BScrollBar::ValueChanged(float newValue)
|
BScrollBar::ValueChanged(float newValue)
|
||||||
{
|
{
|
||||||
if (newValue > fMax)
|
|
||||||
newValue = fMax;
|
|
||||||
if (newValue < fMin)
|
|
||||||
newValue = fMin;
|
|
||||||
|
|
||||||
if (newValue == fValue)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (fTarget) {
|
if (fTarget) {
|
||||||
// cache target bounds
|
// cache target bounds
|
||||||
BRect targetBounds = fTarget->Bounds();
|
BRect targetBounds = fTarget->Bounds();
|
||||||
|
|||||||
Reference in New Issue
Block a user