Fix regression introduced in a65f1e54dc

This commit is contained in:
Juergen Spitzmueller 2018-12-28 17:25:53 +01:00
parent c5301a6495
commit 254affa0b9

View 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") {