| 465 | } |
| 466 | |
| 467 | void SimulationParametersMainWindow::onSaveParameters() |
| 468 | { |
| 469 | GenericFileDialog::get().showSaveFileDialog( |
| 470 | "Save simulation parameters", "Simulation parameters (*.parameters){.parameters},.*", _fileDialogPath, [&](std::filesystem::path const& path) { |
| 471 | auto firstFilename = ifd::FileDialog::Instance().GetResult(); |
| 472 | auto firstFilenameCopy = firstFilename; |
| 473 | _fileDialogPath = firstFilenameCopy.remove_filename().string(); |
| 474 | |
| 475 | auto parameters = _simulationFacade->getSimulationParameters(); |
| 476 | if (!SerializerService::get().serializeSimulationParametersToFile(firstFilename.string(), parameters)) { |
| 477 | GenericMessageDialog::get().information("Save simulation parameters", "The selected file could not be saved."); |
| 478 | } |
| 479 | }); |
| 480 | } |
| 481 | |
| 482 | void SimulationParametersMainWindow::onAddZone() |
| 483 | { |
nothing calls this directly
no test coverage detected