mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
formatting fix
This commit is contained in:
@@ -470,13 +470,13 @@ void CModListView::onCustomContextMenu(const QPoint &point)
|
|||||||
QList<QAction*> actions;
|
QList<QAction*> actions;
|
||||||
|
|
||||||
auto addContextEntry = [this, &contextMenu, &actions, mod](bool visible, bool enabled, QString name, std::function<void(ModState)> function){
|
auto addContextEntry = [this, &contextMenu, &actions, mod](bool visible, bool enabled, QString name, std::function<void(ModState)> function){
|
||||||
if(visible)
|
if(!visible)
|
||||||
{
|
return;
|
||||||
|
|
||||||
actions.append(new QAction(name, this));
|
actions.append(new QAction(name, this));
|
||||||
connect(actions.back(), &QAction::triggered, this, [mod, function](){ function(mod); });
|
connect(actions.back(), &QAction::triggered, this, [mod, function](){ function(mod); });
|
||||||
contextMenu->addAction(actions.back());
|
contextMenu->addAction(actions.back());
|
||||||
actions.back()->setEnabled(enabled);
|
actions.back()->setEnabled(enabled);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
auto state = buttonEnabledState(modName, mod);
|
auto state = buttonEnabledState(modName, mod);
|
||||||
|
|||||||
Reference in New Issue
Block a user