1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

formatting fix

This commit is contained in:
Laserlicht
2025-02-15 14:05:51 +01:00
parent 9ce8f74455
commit de1c407a8e

View File

@@ -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);