mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
* #4603 Python: add case Id to exportSnapshots * Fixup after review
This commit is contained in:
@@ -68,9 +68,9 @@ void RicSnapshotAllViewsToFileFeature::saveAllViews()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
/// Export all snapshots of a given case (or caseId == -1 for all cases)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(const QString& snapshotFolderName, const QString& prefix)
|
||||
void RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(const QString& snapshotFolderName, const QString& prefix /*= ""*/, int caseId /*= -1*/)
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
|
||||
@@ -94,6 +94,9 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfAllViewsIntoFolder(const
|
||||
RimCase* cas = projectCases[i];
|
||||
if (!cas) continue;
|
||||
|
||||
bool matchingCaseId = caseId == -1 || caseId == cas->caseId();
|
||||
if (!matchingCaseId) continue;
|
||||
|
||||
std::vector<Rim3dView*> views = cas->views();
|
||||
|
||||
for (size_t j = 0; j < views.size(); j++)
|
||||
|
||||
@@ -32,7 +32,7 @@ class RicSnapshotAllViewsToFileFeature : public caf::CmdFeature
|
||||
public:
|
||||
static void saveAllViews();
|
||||
|
||||
static void exportSnapshotOfAllViewsIntoFolder(const QString& snapshotFolderName, const QString& prefix = "");
|
||||
static void exportSnapshotOfAllViewsIntoFolder(const QString& snapshotFolderName, const QString& prefix = "", int caseId = -1);
|
||||
|
||||
protected:
|
||||
// Overrides
|
||||
|
||||
Reference in New Issue
Block a user