mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 12:10:57 -06:00
#2038 PRF Plot: Remember chosen well when switching between sim and well
This commit is contained in:
parent
69f33d312a
commit
0f66bf3dd5
@ -109,6 +109,8 @@ RimWellLogTrack::RimWellLogTrack()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_case, "CurveCase", "Case", "", "", "");
|
||||
m_case.uiCapability()->setUiTreeChildrenHidden(true);
|
||||
|
||||
m_simulationWellChosen = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -270,8 +272,7 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
else if (changedField == &m_trajectoryType)
|
||||
{
|
||||
clearGeneratedSimWellPaths(&m_generatedSimulationWellPathBranches);
|
||||
m_wellPath = nullptr;
|
||||
m_simWellName = QString("None");
|
||||
|
||||
loadDataAndUpdate();
|
||||
}
|
||||
else if (changedField == &m_branchIndex)
|
||||
@ -440,6 +441,11 @@ void RimWellLogTrack::loadDataAndUpdate()
|
||||
curves[cIdx]->loadDataAndUpdate(true);
|
||||
}
|
||||
|
||||
if (m_trajectoryType == RimWellLogTrack::SIMULATION_WELL)
|
||||
{
|
||||
m_simulationWellChosen = true;
|
||||
}
|
||||
|
||||
updateFormationNamesOnPlot();
|
||||
}
|
||||
|
||||
@ -807,7 +813,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
std::vector<QString> formationNamesVector;
|
||||
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, geomCase);
|
||||
if (geomExtractor.notNull())
|
||||
if (!m_simulationWellChosen && geomExtractor.notNull())
|
||||
{
|
||||
if (plot->depthType() == RimWellLogPlot::MEASURED_DEPTH)
|
||||
{
|
||||
@ -823,7 +829,12 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
|
||||
}
|
||||
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())
|
||||
{
|
||||
|
@ -82,19 +82,15 @@ public:
|
||||
QString description();
|
||||
std::vector<RimWellLogCurve* > curvesVector();
|
||||
|
||||
protected:
|
||||
|
||||
// Overridden PDM methods
|
||||
private:
|
||||
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;
|
||||
|
||||
void computeAndSetXRangeMinForLogarithmicScale();
|
||||
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() 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 simWellOptionItems(QList<caf::PdmOptionItemInfo>* options, RimCase* eclCase);
|
||||
@ -121,6 +117,8 @@ private:
|
||||
caf::PdmField<QString> m_simWellName;
|
||||
caf::PdmField<int> m_branchIndex;
|
||||
|
||||
bool m_simulationWellChosen;
|
||||
|
||||
cvf::Collection<RigWellPath> m_generatedSimulationWellPathBranches;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user