summaryrefslogtreecommitdiff
path: root/wx+/tooltip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wx+/tooltip.cpp')
-rw-r--r--wx+/tooltip.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp
index 19b6ede7..79d4fa1a 100644
--- a/wx+/tooltip.cpp
+++ b/wx+/tooltip.cpp
@@ -4,6 +4,7 @@
// * Copyright (C) Zenju (zenju AT freefilesync DOT org) - All Rights Reserved *
// *****************************************************************************
#include "tooltip.h"
+#include <zen/zstring.h>
#include <wx/dialog.h>
#include <wx/stattext.h>
#include <wx/sizer.h>
@@ -62,7 +63,7 @@ void Tooltip::show(const wxString& text, wxPoint mousePos, const wxImage* img)
const wxImage& newImg = img ? *img : wxNullImage;
const bool imgChanged = !newImg.IsSameAs(lastUsedImg_);
- const bool txtChanged = text != tipWindow_->staticTextMain_->GetLabelText();
+ const bool txtChanged = text != lastUsedText_;
if (imgChanged)
{
@@ -73,7 +74,8 @@ void Tooltip::show(const wxString& text, wxPoint mousePos, const wxImage* img)
if (txtChanged)
{
- tipWindow_->staticTextMain_->SetLabelText(text);
+ lastUsedText_ = text;
+ tipWindow_->staticTextMain_->SetLabelText(text);
tipWindow_->staticTextMain_->Wrap(fastFromDIP(600));
}
bgstack15