From a26f3b6907f837f92d61fb26f61e889e4efa713f Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 8 Jan 2018 11:46:51 +0100 Subject: [PATCH] #2340 Snapshot : Space in path is replaced with underscore --- .../ExportCommands/RicExportMultipleSnapshotsFeature.cpp | 5 +++-- .../ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ApplicationCode/Commands/ExportCommands/RicExportMultipleSnapshotsFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicExportMultipleSnapshotsFeature.cpp index ff579259d6..f035c88abc 100644 --- a/ApplicationCode/Commands/ExportCommands/RicExportMultipleSnapshotsFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicExportMultipleSnapshotsFeature.cpp @@ -238,8 +238,9 @@ void RicExportMultipleSnapshotsFeature::exportViewVariationsToFolder(RimView* ri if (msd->sliceDirection == RimMultiSnapshotDefinition::NO_RANGEFILTER) { QString fileName = viewCaseResultString + "_" + timeStepString; + fileName.replace(" ", "_"); + QString absoluteFileName = caf::Utils::constructFullFileName(folder, fileName, ".png"); - absoluteFileName.replace(" ", "_"); RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, rimView); } @@ -274,9 +275,9 @@ void RicExportMultipleSnapshotsFeature::exportViewVariationsToFolder(RimView* ri } rimView->rangeFilterCollection()->updateDisplayModeNotifyManagedViews(rangeFilter); + fileName.replace(" ", "_"); QString absoluteFileName = caf::Utils::constructFullFileName(folder, fileName, ".png"); - absoluteFileName.replace(" ", "_"); RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, rimView); } diff --git a/ApplicationCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp b/ApplicationCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp index 48724e965b..b91b150254 100644 --- a/ApplicationCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp +++ b/ApplicationCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp @@ -92,9 +92,9 @@ void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfAllPlotsIntoFolder(QStrin if (viewWindow->isMdiWindow() && viewWindow->viewWidget()) { QString fileName = RicSnapshotFilenameGenerator::generateSnapshotFileName(viewWindow); + fileName.replace(" ", "_"); QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png"); - absoluteFileName.replace(" ", "_"); RicSnapshotViewToFileFeature::saveSnapshotAs(absoluteFileName, viewWindow); }