[haiku-commits] r35435 - haiku/trunk/src/kits/interface

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 9 Feb 2010 04:55:52 +0100 (CET)

Author: anevilyak
Date: 2010-02-09 04:55:52 +0100 (Tue, 09 Feb 2010)
New Revision: 35435
Changeset: http://dev.haiku-os.org/changeset/35435/haiku

Modified:
   haiku/trunk/src/kits/interface/Slider.cpp
Log:
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:".



Modified: haiku/trunk/src/kits/interface/Slider.cpp
===================================================================
--- haiku/trunk/src/kits/interface/Slider.cpp   2010-02-09 01:13:35 UTC (rev 
35434)
+++ haiku/trunk/src/kits/interface/Slider.cpp   2010-02-09 03:55:52 UTC (rev 
35435)
@@ -364,8 +364,7 @@
        ResizeToPreferred();
 
        fLocation.Set(9.0f, 0.0f);
-       fUpdateText = UpdateText();
-
+       
 #if USE_OFF_SCREEN_VIEW
        BRect bounds(Bounds());
 
@@ -398,6 +397,7 @@
 
        SetValue(Value());
                // makes sure the value is within valid bounds
+       UpdateTextChanged();
 }
 
 


Other related posts:

  • » [haiku-commits] r35435 - haiku/trunk/src/kits/interface - anevilyak