From 7ed2158034ef5c26eed7fed9aa3c118d79a06fa8 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Wed, 13 Sep 2023 13:49:38 -0400 Subject: add upstream 13.0 --- wx+/tooltip.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'wx+/tooltip.cpp') 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 #include #include #include @@ -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)); } -- cgit