From ff45fc536a79511563c5fe00e5118c493fa09ccf Mon Sep 17 00:00:00 2001 From: "chunmao.guo" Date: Wed, 28 Jun 2023 11:54:51 +0800 Subject: [PATCH] FIX: [STUDIO-3374] DropDown only show tooltip for ellipsize text Change-Id: I719df15ff5f6601ecbadfb3f483c4a48a90523f4 --- src/slic3r/GUI/Widgets/DropDown.cpp | 5 +++-- src/slic3r/GUI/Widgets/WebView.cpp | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Widgets/DropDown.cpp b/src/slic3r/GUI/Widgets/DropDown.cpp index 4e4ee26ae..fefd77e89 100644 --- a/src/slic3r/GUI/Widgets/DropDown.cpp +++ b/src/slic3r/GUI/Widgets/DropDown.cpp @@ -300,6 +300,8 @@ void DropDown::render(wxDC &dc) if (!text_off && !text.IsEmpty()) { wxSize tSize = dc.GetMultiLineTextExtent(text); if (pt.x + tSize.x > rcContent.GetRight()) { + if (i == hover_item) + SetToolTip(text); text = wxControl::Ellipsize(text, dc, wxELLIPSIZE_END, rcContent.GetRight() - pt.x); } @@ -444,8 +446,7 @@ void DropDown::mouseMove(wxMouseEvent &event) if (hover >= (int) texts.size()) hover = -1; if (hover == hover_item) return; hover_item = hover; - if (hover >= 0) - SetToolTip(texts[hover]); + SetToolTip(""); } paintNow(); } diff --git a/src/slic3r/GUI/Widgets/WebView.cpp b/src/slic3r/GUI/Widgets/WebView.cpp index f14c837c2..6ecddd3e5 100644 --- a/src/slic3r/GUI/Widgets/WebView.cpp +++ b/src/slic3r/GUI/Widgets/WebView.cpp @@ -81,6 +81,7 @@ public: profile->Release(); return true; } + webView2_13->Release(); } return false; }