From 2e0e63fed8f8a8c14f0938480f3f36bb3fa8f057 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Sat, 21 Nov 2020 18:15:20 +0100 Subject: [PATCH] Tooltips for the parameters labels on Settings tabs are back --- src/slic3r/GUI/OG_CustomCtrl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/OG_CustomCtrl.cpp b/src/slic3r/GUI/OG_CustomCtrl.cpp index 3e455f672..7da66a565 100644 --- a/src/slic3r/GUI/OG_CustomCtrl.cpp +++ b/src/slic3r/GUI/OG_CustomCtrl.cpp @@ -244,8 +244,10 @@ void OG_CustomCtrl::OnMotion(wxMouseEvent& event) for (CtrlLine& line : ctrl_lines) { line.is_focused = is_point_in_rect(pos, line.rect_label); - if (line.is_focused && !suppress_hyperlinks) { - tooltip = get_url(line.og_line.label_path); + if (line.is_focused) { + if (!suppress_hyperlinks && !line.og_line.label_path.empty()) + tooltip = get_url(line.og_line.label_path) +"\n\n"; + tooltip += line.og_line.label_tooltip; break; } @@ -610,7 +612,7 @@ wxCoord OG_CustomCtrl::CtrlLine::draw_text(wxDC& dc, wxPoint pos, const wxStr dc.GetMultiLineTextExtent(out_text, &text_width, &text_height); pos.y = pos.y + lround((height - text_height) / 2); - if (width > 0 && is_url) + if (width > 0) rect_label = wxRect(pos, wxSize(text_width, text_height)); wxColour old_clr = dc.GetTextForeground();