Minor cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17817 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-06-13 12:54:57 +00:00
parent f7a09629e5
commit de0ca38e5a
1 changed files with 4 additions and 4 deletions

View File

@ -305,12 +305,9 @@ BSlider::AttachedToWindow()
fOffScreenBits->AddChild(fOffScreenView);
#endif // USE_OFF_SCREEN_VIEW
SetValue(Value());
BView* view = OffscreenView();
BControl::AttachedToWindow();
BView* view = OffscreenView();
if (view) {
rgb_color color = ViewColor();
if (Parent() != NULL)
@ -326,6 +323,9 @@ BSlider::AttachedToWindow()
view->SetLowColor(color);
view->UnlockLooper();
}
SetValue(Value());
// makes sure the value is within valid bounds
}