Call UpdateTextChanged() in BSlider::AttachedToWindow() instead of updating the text manually. Otherwise when a subclass overrode UpdateText and the value hadn't yet been changed, the text would never be updated correctly which resulted in several problems in the VirtualMemory preflet when localizations used a longer string for "Requested swap file size:".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35435 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
177ea1a461
commit
731480e891
@ -364,8 +364,7 @@ BSlider::AttachedToWindow()
|
|||||||
ResizeToPreferred();
|
ResizeToPreferred();
|
||||||
|
|
||||||
fLocation.Set(9.0f, 0.0f);
|
fLocation.Set(9.0f, 0.0f);
|
||||||
fUpdateText = UpdateText();
|
|
||||||
|
|
||||||
#if USE_OFF_SCREEN_VIEW
|
#if USE_OFF_SCREEN_VIEW
|
||||||
BRect bounds(Bounds());
|
BRect bounds(Bounds());
|
||||||
|
|
||||||
@ -398,6 +397,7 @@ BSlider::AttachedToWindow()
|
|||||||
|
|
||||||
SetValue(Value());
|
SetValue(Value());
|
||||||
// makes sure the value is within valid bounds
|
// makes sure the value is within valid bounds
|
||||||
|
UpdateTextChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user