MCPcopy Create free account
hub / github.com/chrxh/alien / onSavePattern

Method onSavePattern

source/Gui/PatternEditorWindow.cpp:341–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341void 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
356bool PatternEditorWindow::isObjectInspectionPossible() const
357{

Callers

nothing calls this directly

Calls 5

showSaveFileDialogMethod · 0.80
isRolloutToClustersMethod · 0.80
informationMethod · 0.80

Tested by

no test coverage detected