From 731480e891c40a63b24acca9a739337a8f9f429a Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Tue, 9 Feb 2010 03:55:52 +0000 Subject: [PATCH] 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 --- src/kits/interface/Slider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/Slider.cpp b/src/kits/interface/Slider.cpp index 78aa251003..b864a3afc3 100644 --- a/src/kits/interface/Slider.cpp +++ b/src/kits/interface/Slider.cpp @@ -364,8 +364,7 @@ BSlider::AttachedToWindow() ResizeToPreferred(); fLocation.Set(9.0f, 0.0f); - fUpdateText = UpdateText(); - + #if USE_OFF_SCREEN_VIEW BRect bounds(Bounds()); @@ -398,6 +397,7 @@ BSlider::AttachedToWindow() SetValue(Value()); // makes sure the value is within valid bounds + UpdateTextChanged(); }