]> git.lyx.org Git - features.git/commitdiff
Always set main Icon Button to the QMenuButton
authorJuergen Spitzmueller <spitz@lyx.org>
Fri, 28 Dec 2018 11:41:19 +0000 (12:41 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 12:39:54 +0000 (14:39 +0200)
src/frontends/qt4/GuiToolbar.cpp

index 60b4b68f60459d78543569b828583d9acf32e103..23bf04c6e8ad014a1926a94138c6c226fa016cb6 100644 (file)
@@ -386,10 +386,11 @@ void DynamicMenuButton::updateTriggered()
                Action * dact = new Action(FuncRequest(LFUN_FONT_DEFAULT, FuncRequest::TOOLBAR), getIcon(FuncRequest(LFUN_UNDO), false),
                                           qt_("&Reset to default"), qt_("Reset all font settings to their defaults"), this);
                m->addAction(dact);
-               if (default_act) {
+               if (default_act)
                        QToolButton::setDefaultAction(default_act);
-                       QToolButton::setIcon(getIcon(FuncRequest(LFUN_TEXTSTYLE_APPLY), false));
-               }
+
+               QToolButton::setIcon(getIcon(FuncRequest(LFUN_TEXTSTYLE_APPLY), false));
+
                setPopupMode(QToolButton::MenuButtonPopup);
                setEnabled(lyx::getStatus(FuncRequest(LFUN_TEXTSTYLE_APPLY)).enabled()
                           || lyx::getStatus(FuncRequest(LFUN_FONT_DEFAULT)).enabled());