mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
filter: don't escape '&' in filter-preset menu
When constructing an action, '&' is used as the keyboard shortcut marker. Since this mangles preset names, use the setIconText() function of the action instead. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5caac4c480
commit
41c0fb4039
1 changed files with 4 additions and 1 deletions
|
@ -77,7 +77,10 @@ void FilterWidget::updatePresetMenu()
|
|||
for (int i = 0; i < count; ++i) {
|
||||
QModelIndex idx = model->index(i, FilterPresetModel::NAME);
|
||||
QString name = model->data(idx, Qt::DisplayRole).value<QString>();
|
||||
loadFilterPresetMenu->addAction(name, [this,i]() { selectPreset(i); });
|
||||
QAction *action = new QAction(loadFilterPresetMenu.get());
|
||||
action->setIconText(name);
|
||||
connect(action, &QAction::triggered, [this,i]() { selectPreset(i); });
|
||||
loadFilterPresetMenu->addAction(action);
|
||||
}
|
||||
ui.loadSetButton->setMenu(loadFilterPresetMenu.get());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue