]> git.lyx.org Git - features.git/commitdiff
Fix regression introduced in a65f1e54dc
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 28 Dec 2018 16:25:53 +0000 (17:25 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 28 Dec 2018 16:25:53 +0000 (17:25 +0100)
src/frontends/qt4/GuiToolbar.cpp

index 8d638665b7107ddaa46bba5f96e992978cb0dcd4..939ea7f33c6c7e6cadef7813040d352edfdaccc8 100644 (file)
@@ -368,8 +368,8 @@ void DynamicMenuButton::updateTriggered()
        } else if (menutype == "textstyle-apply") {
                m->clear();
                setPopupMode(QToolButton::MenuButtonPopup);
-               QToolButton::setIcon(getIcon(FuncRequest(LFUN_TEXTSTYLE_APPLY), false));
                if (!bv) {
+                       QToolButton::setIcon(getIcon(FuncRequest(LFUN_TEXTSTYLE_APPLY), false));
                        setEnabled(false);
                        return;
                }
@@ -396,6 +396,7 @@ void DynamicMenuButton::updateTriggered()
                m->addAction(reset_act);
                if (default_act)
                        QToolButton::setDefaultAction(default_act);
+               QToolButton::setIcon(getIcon(FuncRequest(LFUN_TEXTSTYLE_APPLY), false));
                setEnabled(lyx::getStatus(FuncRequest(LFUN_TEXTSTYLE_APPLY)).enabled()
                           || lyx::getStatus(FuncRequest(LFUN_FONT_DEFAULT)).enabled());
        } else if (menutype == "paste") {