mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#2077 Well Allocation Plot: Set default formation name values
This commit is contained in:
@@ -248,6 +248,7 @@ void RimWellAllocationPlot::updateFromWell()
|
|||||||
RimWellLogTrack* plotTrack = new RimWellLogTrack();
|
RimWellLogTrack* plotTrack = new RimWellLogTrack();
|
||||||
|
|
||||||
plotTrack->setDescription(QString("Branch %1").arg(brIdx + 1));
|
plotTrack->setDescription(QString("Branch %1").arg(brIdx + 1));
|
||||||
|
plotTrack->setBranchIndex((int)brIdx);
|
||||||
|
|
||||||
accumulatedWellFlowPlot()->addTrack(plotTrack);
|
accumulatedWellFlowPlot()->addTrack(plotTrack);
|
||||||
|
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
#include "RimWellFlowRateCurve.h"
|
#include "RimWellFlowRateCurve.h"
|
||||||
|
#include "RimWellAllocationPlot.h"
|
||||||
#include "RimWellLogCurve.h"
|
#include "RimWellLogCurve.h"
|
||||||
#include "RimWellLogPlot.h"
|
#include "RimWellLogPlot.h"
|
||||||
#include "RimWellLogPlotCollection.h"
|
#include "RimWellLogPlotCollection.h"
|
||||||
@@ -259,6 +260,16 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
m_formationCase = cases[0];
|
m_formationCase = cases[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RimWellAllocationPlot* wellAllocationPlot;
|
||||||
|
firstAncestorOrThisOfType(wellAllocationPlot);
|
||||||
|
|
||||||
|
if (wellAllocationPlot)
|
||||||
|
{
|
||||||
|
m_trajectoryType = RimWellLogTrack::SIMULATION_WELL;
|
||||||
|
m_simulationWellChosen = true;
|
||||||
|
m_simWellName = wellAllocationPlot->wellName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loadDataAndUpdate();
|
loadDataAndUpdate();
|
||||||
@@ -508,29 +519,32 @@ void RimWellLogTrack::loadDataAndUpdate()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_trajectoryType == RimWellLogTrack::SIMULATION_WELL;
|
m_trajectoryType = RimWellLogTrack::SIMULATION_WELL;
|
||||||
m_simulationWellChosen = true;
|
m_simulationWellChosen = true;
|
||||||
m_simWellName = wellName;
|
m_simWellName = wellName;
|
||||||
m_branchIndex = rftPlot->branchIndex();
|
m_branchIndex = rftPlot->branchIndex();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_showFormations)
|
RimWellAllocationPlot* wellAllocationPlot;
|
||||||
|
(rftPlot || pltPlot) ? wellAllocationPlot = nullptr : firstAncestorOrThisOfType(wellAllocationPlot);
|
||||||
|
|
||||||
|
if (wellAllocationPlot)
|
||||||
{
|
{
|
||||||
m_trajectoryType.uiCapability()->setUiReadOnly(false);
|
setFormationFieldsUiReadOnly(true);
|
||||||
m_simWellName.uiCapability()->setUiReadOnly(false);
|
|
||||||
m_formationCase.uiCapability()->setUiReadOnly(false);
|
|
||||||
m_wellPath.uiCapability()->setUiReadOnly(false);
|
|
||||||
m_branchIndex.uiCapability()->setUiReadOnly(false);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_trajectoryType.uiCapability()->setUiReadOnly(true);
|
if (m_showFormations)
|
||||||
m_simWellName.uiCapability()->setUiReadOnly(true);
|
{
|
||||||
m_formationCase.uiCapability()->setUiReadOnly(true);
|
setFormationFieldsUiReadOnly(false);
|
||||||
m_wellPath.uiCapability()->setUiReadOnly(true);
|
}
|
||||||
m_branchIndex.uiCapability()->setUiReadOnly(true);
|
else
|
||||||
|
{
|
||||||
|
setFormationFieldsUiReadOnly(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
updateFormationNamesOnPlot();
|
updateFormationNamesOnPlot();
|
||||||
}
|
}
|
||||||
@@ -543,6 +557,14 @@ void RimWellLogTrack::setXAxisTitle(const QString& text)
|
|||||||
m_xAxisTitle = text;
|
m_xAxisTitle = text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogTrack::setBranchIndex(int branchIndex)
|
||||||
|
{
|
||||||
|
m_branchIndex = branchIndex;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -1054,6 +1076,18 @@ std::vector<QString> RimWellLogTrack::formationNamesVector(RimCase* rimCase)
|
|||||||
return std::vector<QString>();
|
return std::vector<QString>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimWellLogTrack::setFormationFieldsUiReadOnly(bool readOnly /*= true*/)
|
||||||
|
{
|
||||||
|
m_trajectoryType.uiCapability()->setUiReadOnly(readOnly);
|
||||||
|
m_simWellName.uiCapability()->setUiReadOnly(readOnly);
|
||||||
|
m_formationCase.uiCapability()->setUiReadOnly(readOnly);
|
||||||
|
m_wellPath.uiCapability()->setUiReadOnly(readOnly);
|
||||||
|
m_branchIndex.uiCapability()->setUiReadOnly(readOnly);
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ 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 setBranchIndex(int branchIndex);
|
||||||
|
|
||||||
void recreateViewer();
|
void recreateViewer();
|
||||||
void detachAllCurves();
|
void detachAllCurves();
|
||||||
@@ -132,6 +133,8 @@ private:
|
|||||||
|
|
||||||
static std::vector<QString> formationNamesVector(RimCase* rimCase);
|
static std::vector<QString> formationNamesVector(RimCase* rimCase);
|
||||||
|
|
||||||
|
void setFormationFieldsUiReadOnly(bool readOnly = true);
|
||||||
|
|
||||||
void updateFormationNamesOnPlot();
|
void updateFormationNamesOnPlot();
|
||||||
void removeFormationNames();
|
void removeFormationNames();
|
||||||
void updateAxisScaleEngine();
|
void updateAxisScaleEngine();
|
||||||
|
|||||||
Reference in New Issue
Block a user