| 339 | } |
| 340 | |
| 341 | void PatternEditorWindow::onSavePattern() |
| 342 | { |
| 343 | GenericFileDialog::get().showSaveFileDialog( |
| 344 | "Save pattern", "Pattern file (*.sim){.sim},.*", _startingPath, [&](std::filesystem::path const& path) { |
| 345 | auto firstFilename = ifd::FileDialog::Instance().GetResult(); |
| 346 | auto firstFilenameCopy = firstFilename; |
| 347 | _startingPath = firstFilenameCopy.remove_filename().string(); |
| 348 | |
| 349 | auto content = _simulationFacade->getSelectedClusteredSimulationData(EditorModel::get().isRolloutToClusters()); |
| 350 | if (!SerializerService::get().serializeContentToFile(firstFilename.string(), content)) { |
| 351 | GenericMessageDialog::get().information("Save pattern", "The selected pattern could not be saved to the specified file."); |
| 352 | } |
| 353 | }); |
| 354 | } |
| 355 | |
| 356 | bool PatternEditorWindow::isObjectInspectionPossible() const |
| 357 | { |
nothing calls this directly
no test coverage detected