mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Add "Reset to Default" item to textstyle-apply button menu
Fixes: #5922.
This commit is contained in:
parent
2d876f8d9d
commit
e704cc6e82
@ -382,12 +382,17 @@ void DynamicMenuButton::updateTriggered()
|
||||
default_act = act;
|
||||
++i;
|
||||
}
|
||||
// Add item to reset to defaults
|
||||
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) {
|
||||
QToolButton::setDefaultAction(default_act);
|
||||
QToolButton::setIcon(getIcon(FuncRequest(LFUN_TEXTSTYLE_APPLY), false));
|
||||
}
|
||||
setPopupMode(QToolButton::MenuButtonPopup);
|
||||
setEnabled(lyx::getStatus(FuncRequest(LFUN_TEXTSTYLE_APPLY)).enabled());
|
||||
setEnabled(lyx::getStatus(FuncRequest(LFUN_TEXTSTYLE_APPLY)).enabled()
|
||||
|| lyx::getStatus(FuncRequest(LFUN_FONT_DEFAULT)).enabled());
|
||||
} else if (menutype == "paste") {
|
||||
m->clear();
|
||||
docstring_list const sel = cap::availableSelections(&bv->buffer());
|
||||
|
Loading…
Reference in New Issue
Block a user