mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
Ensure .pvd files are loaded when cases are opened from history or command line
This commit is contained in:
1 parent
e3be3dd9cc
commit
4fdb301695
3 files changed
+13
-4
No files matched your search
@@ -48,6 +48,7 @@
|
||||
|
||||
#include "RicImportGeneralDataFeature.h"
|
||||
#include "RicImportGridAndSummaryEnsembleFeature.h"
|
||||
#include "RicImportEclipseCaseFeature.h"
|
||||
#include "RicfCommandFileExecutor.h"
|
||||
#include "RicfCommandObject.h"
|
||||
|
||||
@@ -427,6 +428,12 @@ bool RiaApplication::openFile( const QString& fileName )
|
||||
bool createPlot = true;
|
||||
loadingSucceded = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( QStringList{ fileName }, createPlot, createView );
|
||||
lastUsedDialogTag = RiaDefines::defaultDirectoryLabel( fileType );
|
||||
|
||||
if ( loadingSucceded && RiaDefines::isEclipseResultFileType( fileType ) )
|
||||
{
|
||||
// Keep behavior consistent with menu-based Eclipse case import.
|
||||
RicImportEclipseCaseFeature::importPvdSurfacesForGridFiles( QStringList{ fileName }, {} );
|
||||
}
|
||||
}
|
||||
|
||||
if ( loadingSucceded )
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
#include "RiuRecentFileActionProvider.h"
|
||||
|
||||
#include "RicImportEclipseCaseFeature.h"
|
||||
#include "RicImportGeneralDataFeature.h"
|
||||
|
||||
#include "cvfProgramOptions.h"
|
||||
@@ -318,7 +319,11 @@ RiaApplication::ApplicationStatus RiaConsoleApplication::handleArguments( gsl::n
|
||||
|
||||
bool createView = true;
|
||||
bool createPlot = true;
|
||||
RicImportGeneralDataFeature::openEclipseFilesFromFileNames( fileNames, createPlot, createView );
|
||||
auto results = RicImportGeneralDataFeature::openEclipseFilesFromFileNames( fileNames, createPlot, createView );
|
||||
if ( results )
|
||||
{
|
||||
RicImportEclipseCaseFeature::importPvdSurfacesForGridFiles( fileNames, {} );
|
||||
}
|
||||
}
|
||||
|
||||
if ( cvf::Option o = progOpt->option( "commandFile" ) )
|
||||
|
||||
@@ -178,7 +178,6 @@ std::vector<RimEclipseView*> RicImportEclipseCaseFeature::allEclipseViews( RimPr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
#include <iostream>
|
||||
QStringList RicImportEclipseCaseFeature::findPvdFilesToImport( const QStringList& fileNames )
|
||||
{
|
||||
QStringList pvdFilesToImport;
|
||||
@@ -210,7 +209,6 @@ QStringList RicImportEclipseCaseFeature::findPvdFilesToImport( const QStringList
|
||||
otherBase.compare( baseName, Qt::CaseInsensitive ) != 0 )
|
||||
{
|
||||
otherBases.insert( otherBase );
|
||||
std::cout << "Found other Eclipse case base: " << otherBase.toStdString() << " (from file " << fileName.toStdString() << ")" << std::endl;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -232,7 +230,6 @@ QStringList RicImportEclipseCaseFeature::findPvdFilesToImport( const QStringList
|
||||
if ( pvdFile.startsWith( otherBase, Qt::CaseInsensitive ) )
|
||||
{
|
||||
matchesOtherBase = true;
|
||||
std::cout << "Excluding PVD file: " << pvdFile.toStdString() << " (matches other base: " << otherBase.toStdString() << ")" << std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user