diff --git a/src/framework/ui/uiwidgetbasestyle.cpp b/src/framework/ui/uiwidgetbasestyle.cpp index ac67e00ff6..2f76132880 100644 --- a/src/framework/ui/uiwidgetbasestyle.cpp +++ b/src/framework/ui/uiwidgetbasestyle.cpp @@ -402,7 +402,7 @@ void UIWidget::drawIcon(const Rect& screenCoords) const void UIWidget::setIcon(const std::string& iconFile) { - g_mainDispatcher.addEvent([&, iconFile = iconFile]() { + g_dispatcher.addEvent([&, iconFile = iconFile]() { m_icon = iconFile.empty() ? nullptr : g_textures.getTexture(iconFile); if (m_icon && !m_iconClipRect.isValid()) { m_iconClipRect = Rect(0, 0, m_icon->getSize()); @@ -410,4 +410,4 @@ void UIWidget::setIcon(const std::string& iconFile) repaint(); }); -} \ No newline at end of file +}