Use more convenient MenuButtonPopup

This commit is contained in:
Juergen Spitzmueller 2018-12-27 11:09:52 +01:00
parent bb73e93af7
commit eb1b88aba7

View File

@ -386,7 +386,7 @@ void DynamicMenuButton::updateTriggered()
QToolButton::setDefaultAction(default_act);
QToolButton::setIcon(getIcon(FuncRequest(LFUN_TEXTSTYLE_APPLY), false));
}
setPopupMode(QToolButton::DelayedPopup);
setPopupMode(QToolButton::MenuButtonPopup);
setEnabled(lyx::getStatus(FuncRequest(LFUN_TEXTSTYLE_APPLY)).enabled());
} else if (menutype == "paste") {
m->clear();
@ -408,7 +408,7 @@ void DynamicMenuButton::updateTriggered()
getIcon(FuncRequest(LFUN_PASTE), false),
qt_("Paste"), qt_("Paste"), this);
QToolButton::setDefaultAction(default_action);
setPopupMode(QToolButton::DelayedPopup);
setPopupMode(QToolButton::MenuButtonPopup);
setEnabled(lyx::getStatus(FuncRequest(LFUN_PASTE)).enabled());
}
}