[haiku-commits] haiku: hrev45347 - src/preferences/time

  • From: leavengood@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 7 Mar 2013 15:21:18 +0100 (CET)

hrev45347 adds 1 changeset to branch 'master'
old head: 57ad8744837fa88a3bbc87e63a72bfdbfa99596e
new head: eb594c5cd5a3a6b8b89be13f22f0e2731273bcae
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=eb594c5+%5E57ad874

----------------------------------------------------------------------------

eb594c5: Don't constantly recreate the tool tip, just update the text.
  
  Fixes #9502, more or less.

                                  [ Ryan Leavengood <leavengood@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev45347
Commit:      eb594c5cd5a3a6b8b89be13f22f0e2731273bcae
URL:         http://cgit.haiku-os.org/haiku/commit/?id=eb594c5
Author:      Ryan Leavengood <leavengood@xxxxxxxxx>
Date:        Thu Mar  7 14:20:17 2013 UTC

Ticket:      https://dev.haiku-os.org/ticket/9502

----------------------------------------------------------------------------

1 file changed, 6 insertions(+), 4 deletions(-)
src/preferences/time/TimeZoneListView.cpp | 10 ++++++----

----------------------------------------------------------------------------

diff --git a/src/preferences/time/TimeZoneListView.cpp 
b/src/preferences/time/TimeZoneListView.cpp
index 87a8519..aa75195 100644
--- a/src/preferences/time/TimeZoneListView.cpp
+++ b/src/preferences/time/TimeZoneListView.cpp
@@ -63,10 +63,12 @@ TimeZoneListView::GetToolTipAt(BPoint point, BToolTip** 
_tip)
                        << " (" << dateInTimeZone << ')';
 
        if (fToolTip != NULL)
-               fToolTip->ReleaseReference();
-       fToolTip = new (std::nothrow) BTextToolTip(toolTip.String());
-       if (fToolTip == NULL)
-               return false;
+               fToolTip->SetText(toolTip.String());
+       else {
+               fToolTip = new (std::nothrow) BTextToolTip(toolTip.String());
+               if (fToolTip == NULL)
+                       return false;
+       }
 
        *_tip = fToolTip;
 


Other related posts:

  • » [haiku-commits] haiku: hrev45347 - src/preferences/time - leavengood