mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2027 Select well log on well log import
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user