From f375ced8834d41002cbc13c9f1c5161d3afd8c98 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 22 Oct 2019 20:31:06 -0300 Subject: [PATCH] Fix loading tooltips for comboboxes --- src/app/widget_loader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/widget_loader.cpp b/src/app/widget_loader.cpp index bc0256d5c..ad1aa91d9 100644 --- a/src/app/widget_loader.cpp +++ b/src/app/widget_loader.cpp @@ -565,7 +565,12 @@ void WidgetLoader::fillWidgetWithXmlElementAttributes(const TiXmlElement* elem, else if (strcmp(tooltip_dir, "right") == 0) dir = RIGHT; } - m_tooltipManager->addTooltipFor(widget, m_xmlTranslator(elem, "tooltip"), dir); + Widget* widgetWithTooltip; + if (widget->type() == ui::kComboBoxWidget) + widgetWithTooltip = static_cast(widget)->getEntryWidget(); + else + widgetWithTooltip = widget; + m_tooltipManager->addTooltipFor(widgetWithTooltip, m_xmlTranslator(elem, "tooltip"), dir); } if (selected)