From c95b3937fef3e2c63768f1b3b1dc2c898f23d91d Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 22 Jul 2020 11:37:03 -0400 Subject: add upstream 11.0 --- wx+/tooltip.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'wx+/tooltip.cpp') diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp index 0beef0bf..e3c021c6 100644 --- a/wx+/tooltip.cpp +++ b/wx+/tooltip.cpp @@ -54,16 +54,17 @@ public: }; -void Tooltip::show(const wxString& text, wxPoint mousePos, const wxBitmap* bmp) +void Tooltip::show(const wxString& text, wxPoint mousePos, const wxImage* img) { if (!tipWindow_) tipWindow_ = new TooltipDlgGenerated(&parent_); //ownership passed to parent - const wxBitmap& newBmp = bmp ? *bmp : wxNullBitmap; + const wxImage& newImg = img ? *img : wxNullImage; - if (!tipWindow_->bitmapLeft_->GetBitmap().IsSameAs(newBmp)) + if (!lastUsedImg_.IsSameAs(newImg)) { - tipWindow_->bitmapLeft_->SetBitmap(newBmp); + lastUsedImg_ = newImg; + tipWindow_->bitmapLeft_->SetBitmap(newImg); tipWindow_->Refresh(); //needed if bitmap size changed! } -- cgit