#1730 Include more information in snapshot filenames

This commit is contained in:
Bjørnar Grip Fjær
2017-08-04 11:25:17 +02:00
parent 88186619db
commit 37456bfa9b
11 changed files with 375 additions and 78 deletions

View File

@@ -26,6 +26,7 @@
#include "RimViewWindow.h"
#include "RicSnapshotViewToFileFeature.h"
#include "RicSnapshotFilenameGenerator.h"
#include "RiuMainPlotWindow.h"
@@ -90,17 +91,7 @@ void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfAllPlotsIntoFolder(QStrin
{
if (viewWindow->isMdiWindow() && viewWindow->viewWidget())
{
QString fileName;
if ( viewWindow->userDescriptionField())
{
fileName = viewWindow->userDescriptionField()->uiCapability()->uiValue().toString();
}
else
{
fileName = viewWindow->uiCapability()->uiName();
}
fileName = caf::Utils::makeValidFileBasename(fileName);
QString fileName = RicSnapshotFilenameGenerator::generateSnapshotFileName(viewWindow);
QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png");
absoluteFileName.replace(" ", "_");