#1013 System : Regression tests for plot images

This commit is contained in:
Magne Sjaastad
2016-11-29 15:18:55 +01:00
parent 61ba5c2ca1
commit 22d09c0517
3 changed files with 17 additions and 0 deletions

View File

@@ -178,6 +178,19 @@ void RicSnapshotAllPlotsToFileFeature::saveAllPlots()
// Save images in snapshot catalog relative to project directory
QString snapshotFolderName = app->createAbsolutePathFromProjectRelativePath("snapshots");
createSnapshotOfAllPlotsInFolder(snapshotFolderName);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicSnapshotAllPlotsToFileFeature::createSnapshotOfAllPlotsInFolder(QString snapshotFolderName)
{
RiaApplication* app = RiaApplication::instance();
RimProject* proj = app->project();
if (!proj) return;
QDir snapshotPath(snapshotFolderName);
if (!snapshotPath.exists())
{

View File

@@ -66,6 +66,8 @@ class RicSnapshotAllPlotsToFileFeature : public caf::CmdFeature
public:
static void saveAllPlots();
static void createSnapshotOfAllPlotsInFolder(QString snapshotFolderName);
protected:
// Overrides
virtual bool isCommandEnabled() override;