456 openModelFromPath(path, &libraries, &documents, &mainWindow); |
456 openModelFromPath(path, &libraries, &documents, &mainWindow); |
457 } |
457 } |
458 ); |
458 ); |
459 } |
459 } |
460 }; |
460 }; |
461 static constexpr auto executeAction = [&]( |
461 const auto executeAction = [&]( |
462 Model* model, const ModelAction& action |
462 Model* model, const ModelAction& action |
463 ) { |
463 ) { |
464 std::visit(overloaded{ |
464 std::visit(overloaded{ |
465 [model](const AppendToModel& action){ |
465 [model](const AppendToModel& action){ |
466 model->append(action.newElement); |
466 model->append(action.newElement); |