diff options
Diffstat (limited to 'wx+')
-rw-r--r-- | wx+/dc.h | 8 | ||||
-rw-r--r-- | wx+/tooltip.cpp | 5 |
2 files changed, 8 insertions, 5 deletions
@@ -195,8 +195,12 @@ public: } else { - dc_.SetClippingRegion(r); - clippingAreas_.emplace(&dc_, r); + //caveat: actual clipping region is smaller when rect is not fully inside the DC + //=> ensure consistency for validateClippingBuffer() + const wxRect tmp = getIntersection(r, wxRect(dc.GetSize())); + + dc_.SetClippingRegion(tmp); + clippingAreas_.emplace(&dc_, tmp); } } diff --git a/wx+/tooltip.cpp b/wx+/tooltip.cpp index 01b5ead4..14df955c 100644 --- a/wx+/tooltip.cpp +++ b/wx+/tooltip.cpp @@ -75,10 +75,9 @@ void Tooltip::show(const wxString& text, wxPoint mousePos, const wxImage* img) if (txtChanged) { lastUsedText_ = text; - { tipWindow_->staticTextMain_->SetLabelText(text); - tipWindow_->staticTextMain_->Wrap(dipToWxsize(600)); - } + + tipWindow_->staticTextMain_->Wrap(dipToWxsize(600)); } if (imgChanged || txtChanged) |