#2027 Select well log on well log import

This commit is contained in:
Rebecca Cox
2017-10-20 14:05:42 +02:00
parent e9ee33a765
commit 53912c4152
3 changed files with 18 additions and 10 deletions

View File

@@ -61,6 +61,7 @@
#include "RimOilField.h"
#include "RimProject.h"
#include "RimReservoirCellResultsStorage.h"
#include "RimRftPlotCollection.h"
#include "RimScriptCollection.h"
#include "RimSummaryCase.h"
#include "RimSummaryCaseMainCollection.h"
@@ -70,11 +71,11 @@
#include "RimViewLinker.h"
#include "RimViewLinkerCollection.h"
#include "RimWellAllocationPlot.h"
#include "RimWellLogFile.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "RimRftPlotCollection.h"
#include "RimWellRftPlot.h"
#include "RiuMainPlotWindow.h"
@@ -750,21 +751,23 @@ void RiaApplication::addWellPathsToModel(QList<QString> wellPathFilePaths)
//--------------------------------------------------------------------------------------------------
void RiaApplication::addWellLogsToModel(const QList<QString>& wellLogFilePaths)
{
if (m_project == NULL || m_project->oilFields.size() < 1) return;
if (m_project == nullptr || m_project->oilFields.size() < 1) return;
RimOilField* oilField = m_project->activeOilField();
if (oilField == NULL) return;
if (oilField == nullptr) return;
if (oilField->wellPathCollection == NULL)
if (oilField->wellPathCollection == nullptr)
{
oilField->wellPathCollection = new RimWellPathCollection();
m_project->updateConnectedEditors();
}
if (oilField->wellPathCollection) oilField->wellPathCollection->addWellLogs(wellLogFilePaths);
RimWellLogFile* wellLogFile = oilField->wellPathCollection->addWellLogs(wellLogFilePaths);
oilField->wellPathCollection->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(wellLogFile);
}

View File

@@ -287,11 +287,13 @@ void RimWellPathCollection::addWellPaths(const std::vector<RimWellPath*> wellPat
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathCollection::addWellLogs(const QStringList& filePaths)
RimWellLogFile* RimWellPathCollection::addWellLogs(const QStringList& filePaths)
{
RimWellLogFile* logFileInfo;
foreach (QString filePath, filePaths)
{
RimWellLogFile* logFileInfo = RimWellLogFile::readWellLogFile(filePath);
logFileInfo = RimWellLogFile::readWellLogFile(filePath);
if (logFileInfo)
{
RimWellPath* wellPath = wellPathByName(logFileInfo->wellName());
@@ -306,6 +308,8 @@ void RimWellPathCollection::addWellLogs(const QStringList& filePaths)
}
this->sortWellsByName();
return logFileInfo;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -37,10 +37,11 @@
#include <QString>
class RifWellPathImporter;
class RimWellPath;
class RimProject;
class RigWellPath;
class RimEclipseView;
class RimProject;
class RimWellLogFile;
class RimWellPath;
namespace cvf {
class ModelBasicList;
@@ -94,7 +95,7 @@ public:
RimWellPath* wellPathByName(const QString& wellPathName) const;
void addWellPaths(const std::vector<RimWellPath*> wellPaths);
void addWellLogs(const QStringList& filePaths);
RimWellLogFile* addWellLogs(const QStringList& filePaths);
void scheduleRedrawAffectedViews();