mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Formation names: Set default formation info on add curve commands
This commit is contained in:
parent
c6b5936b30
commit
38e2b7a74a
@ -24,6 +24,7 @@
|
|||||||
#include "RimEclipseResultCase.h"
|
#include "RimEclipseResultCase.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimSimWellInView.h"
|
#include "RimSimWellInView.h"
|
||||||
|
#include "RimView.h"
|
||||||
#include "RimWellLogExtractionCurve.h"
|
#include "RimWellLogExtractionCurve.h"
|
||||||
#include "RimWellLogFileChannel.h"
|
#include "RimWellLogFileChannel.h"
|
||||||
#include "RimWellLogFileCurve.h"
|
#include "RimWellLogFileCurve.h"
|
||||||
@ -156,8 +157,24 @@ RimWellLogExtractionCurve* RicWellLogTools::addExtractionCurve(RimWellLogTrack*
|
|||||||
|
|
||||||
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plotTrack->curveCount());
|
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plotTrack->curveCount());
|
||||||
curve->setColor(curveColor);
|
curve->setColor(curveColor);
|
||||||
if (wellPath) curve->setWellPath(wellPath);
|
if (wellPath)
|
||||||
if (simWell) curve->setFromSimulationWellName(simWell->name(), branchIndex);
|
{
|
||||||
|
curve->setWellPath(wellPath);
|
||||||
|
plotTrack->setFormationWellPath(wellPath);
|
||||||
|
plotTrack->setFormationTrajectoryType(RimWellLogTrack::WELL_PATH);
|
||||||
|
}
|
||||||
|
if (simWell)
|
||||||
|
{
|
||||||
|
curve->setFromSimulationWellName(simWell->name(), branchIndex);
|
||||||
|
plotTrack->setFormationSimWellName(simWell->name());
|
||||||
|
plotTrack->setFormationBranchIndex(branchIndex);
|
||||||
|
plotTrack->setFormationTrajectoryType(RimWellLogTrack::SIMULATION_WELL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (view)
|
||||||
|
{
|
||||||
|
plotTrack->setFormationCase(view->ownerCase());
|
||||||
|
}
|
||||||
|
|
||||||
curve->setPropertiesFromView(view);
|
curve->setPropertiesFromView(view);
|
||||||
|
|
||||||
@ -184,7 +201,7 @@ RimWellLogRftCurve* RicWellLogTools::addRftCurve(RimWellLogTrack* plotTrack, con
|
|||||||
|
|
||||||
RimWellLogRftCurve* curve = new RimWellLogRftCurve();
|
RimWellLogRftCurve* curve = new RimWellLogRftCurve();
|
||||||
|
|
||||||
RimEclipseResultCase* resultCase;
|
RimEclipseResultCase* resultCase = nullptr;
|
||||||
|
|
||||||
std::vector<RimCase*> cases;
|
std::vector<RimCase*> cases;
|
||||||
RiaApplication::instance()->project()->allCases(cases);
|
RiaApplication::instance()->project()->allCases(cases);
|
||||||
@ -201,12 +218,17 @@ RimWellLogRftCurve* RicWellLogTools::addRftCurve(RimWellLogTrack* plotTrack, con
|
|||||||
{
|
{
|
||||||
curve->setEclipseResultCase(resultCase);
|
curve->setEclipseResultCase(resultCase);
|
||||||
curve->setDefaultAddress(simWell->name());
|
curve->setDefaultAddress(simWell->name());
|
||||||
|
|
||||||
|
plotTrack->setFormationCase(resultCase);
|
||||||
|
plotTrack->setFormationSimWellName(simWell->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plotTrack->curveCount());
|
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plotTrack->curveCount());
|
||||||
curve->setColor(curveColor);
|
curve->setColor(curveColor);
|
||||||
|
|
||||||
plotTrack->addCurve(curve);
|
plotTrack->addCurve(curve);
|
||||||
|
plotTrack->setFormationTrajectoryType(RimWellLogTrack::SIMULATION_WELL);
|
||||||
plotTrack->updateConnectedEditors();
|
plotTrack->updateConnectedEditors();
|
||||||
|
|
||||||
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
RiuMainPlotWindow* plotwindow = RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
|
||||||
|
@ -474,7 +474,7 @@ void RimWellLogTrack::availableDepthRange(double* minimumDepth, double* maximumD
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimWellLogTrack::loadDataAndUpdate()
|
void RimWellLogTrack::loadDataAndUpdate()
|
||||||
{
|
{
|
||||||
RimWellLogPlot* wellLogPlot;
|
RimWellLogPlot* wellLogPlot = nullptr;
|
||||||
firstAncestorOrThisOfType(wellLogPlot);
|
firstAncestorOrThisOfType(wellLogPlot);
|
||||||
|
|
||||||
if (wellLogPlot && m_wellLogTrackPlotWidget)
|
if (wellLogPlot && m_wellLogTrackPlotWidget)
|
||||||
@ -552,6 +552,22 @@ void RimWellLogTrack::setXAxisTitle(const QString& text)
|
|||||||
m_xAxisTitle = text;
|
m_xAxisTitle = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogTrack::setFormationWellPath(RimWellPath* wellPath)
|
||||||
|
{
|
||||||
|
m_formationWellPath = wellPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogTrack::setFormationSimWellName(const QString& simWellName)
|
||||||
|
{
|
||||||
|
m_formationSimWellName = simWellName;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -560,6 +576,22 @@ void RimWellLogTrack::setFormationBranchIndex(int branchIndex)
|
|||||||
m_formationBranchIndex = branchIndex;
|
m_formationBranchIndex = branchIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogTrack::setFormationCase(RimCase* rimCase)
|
||||||
|
{
|
||||||
|
m_formationCase = rimCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogTrack::setFormationTrajectoryType(TrajectoryType trajectoryType)
|
||||||
|
{
|
||||||
|
m_formationTrajectoryType = trajectoryType;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -80,7 +80,12 @@ public:
|
|||||||
size_t curveIndex(RimWellLogCurve* curve);
|
size_t curveIndex(RimWellLogCurve* curve);
|
||||||
size_t curveCount() { return curves.size(); }
|
size_t curveCount() { return curves.size(); }
|
||||||
void setXAxisTitle(const QString& text);
|
void setXAxisTitle(const QString& text);
|
||||||
|
|
||||||
|
void setFormationWellPath(RimWellPath* wellPath);
|
||||||
|
void setFormationSimWellName(const QString& simWellName);
|
||||||
void setFormationBranchIndex(int branchIndex);
|
void setFormationBranchIndex(int branchIndex);
|
||||||
|
void setFormationCase(RimCase* rimCase);
|
||||||
|
void setFormationTrajectoryType(TrajectoryType trajectoryType);
|
||||||
int formationBranchIndex() const;
|
int formationBranchIndex() const;
|
||||||
RimCase* formationNamesCase() const;
|
RimCase* formationNamesCase() const;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user