mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 16:32:12 -05:00
#2038 PRF Plot: Remember chosen well when switching between sim and well
This commit is contained in:
1 parent
69f33d312a
commit
0f66bf3dd5
2 files changed
+19
-10
No files matched your search
@@ -109,6 +109,8 @@ RimWellLogTrack::RimWellLogTrack()
|
|||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Case", "", "", "");
|
CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Case", "", "", "");
|
||||||
m_case.uiCapability()->setUiTreeChildrenHidden(true);
|
m_case.uiCapability()->setUiTreeChildrenHidden(true);
|
||||||
|
|
||||||
|
m_simulationWellChosen = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -270,8 +272,7 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
else if (changedField == &m_trajectoryType)
|
else if (changedField == &m_trajectoryType)
|
||||||
{
|
{
|
||||||
clearGeneratedSimWellPaths(&m_generatedSimulationWellPathBranches);
|
clearGeneratedSimWellPaths(&m_generatedSimulationWellPathBranches);
|
||||||
m_wellPath = nullptr;
|
|
||||||
m_simWellName = QString("None");
|
|
||||||
loadDataAndUpdate();
|
loadDataAndUpdate();
|
||||||
}
|
}
|
||||||
else if (changedField == &m_branchIndex)
|
else if (changedField == &m_branchIndex)
|
||||||
@@ -440,6 +441,11 @@ void RimWellLogTrack::loadDataAndUpdate()
|
|||||||
curves[cIdx]->loadDataAndUpdate(true);
|
curves[cIdx]->loadDataAndUpdate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_trajectoryType == RimWellLogTrack::SIMULATION_WELL)
|
||||||
|
{
|
||||||
|
m_simulationWellChosen = true;
|
||||||
|
}
|
||||||
|
|
||||||
updateFormationNamesOnPlot();
|
updateFormationNamesOnPlot();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -807,7 +813,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
std::vector<QString> formationNamesVector;
|
std::vector<QString> formationNamesVector;
|
||||||
|
|
||||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, geomCase);
|
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, geomCase);
|
||||||
if (geomExtractor.notNull())
|
if (!m_simulationWellChosen && geomExtractor.notNull())
|
||||||
{
|
{
|
||||||
if (plot->depthType() == RimWellLogPlot::MEASURED_DEPTH)
|
if (plot->depthType() == RimWellLogPlot::MEASURED_DEPTH)
|
||||||
{
|
{
|
||||||
@@ -823,7 +829,12 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cvf::ref<RigEclipseWellLogExtractor> eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
|
cvf::ref<RigEclipseWellLogExtractor> eclExtractor;
|
||||||
|
|
||||||
|
if (!m_simulationWellChosen)
|
||||||
|
{
|
||||||
|
eclExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, eclipseCase);
|
||||||
|
}
|
||||||
|
|
||||||
if (eclExtractor.isNull())
|
if (eclExtractor.isNull())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -82,19 +82,15 @@ public:
|
|||||||
QString description();
|
QString description();
|
||||||
std::vector<RimWellLogCurve* > curvesVector();
|
std::vector<RimWellLogCurve* > curvesVector();
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
|
|
||||||
// Overridden PDM methods
|
|
||||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||||
|
|
||||||
void computeAndSetXRangeMinForLogarithmicScale();
|
|
||||||
|
|
||||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||||
|
|
||||||
private:
|
void computeAndSetXRangeMinForLogarithmicScale();
|
||||||
|
|
||||||
static void updateGeneratedSimulationWellpath(cvf::Collection<RigWellPath>* generatedSimulationWellPathBranches, const QString& simWellName, RimCase* rimCase);
|
static void updateGeneratedSimulationWellpath(cvf::Collection<RigWellPath>* generatedSimulationWellPathBranches, const QString& simWellName, RimCase* rimCase);
|
||||||
static void simWellOptionItems(QList<caf::PdmOptionItemInfo>* options, RimCase* eclCase);
|
static void simWellOptionItems(QList<caf::PdmOptionItemInfo>* options, RimCase* eclCase);
|
||||||
@@ -121,6 +117,8 @@ private:
|
|||||||
caf::PdmField<QString> m_simWellName;
|
caf::PdmField<QString> m_simWellName;
|
||||||
caf::PdmField<int> m_branchIndex;
|
caf::PdmField<int> m_branchIndex;
|
||||||
|
|
||||||
|
bool m_simulationWellChosen;
|
||||||
|
|
||||||
cvf::Collection<RigWellPath> m_generatedSimulationWellPathBranches;
|
cvf::Collection<RigWellPath> m_generatedSimulationWellPathBranches;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user