Fix loading tooltips for comboboxes

This commit is contained in:
David Capello 2019-10-22 20:31:06 -03:00
parent 398daf14db
commit f375ced883

View File

@ -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<ComboBox*>(widget)->getEntryWidget();
else
widgetWithTooltip = widget;
m_tooltipManager->addTooltipFor(widgetWithTooltip, m_xmlTranslator(elem, "tooltip"), dir);
}
if (selected)