#2592 3D well log curves: Update curves after editing properties

This commit is contained in:
Rebecca Cox 2018-03-13 11:18:25 +01:00
parent ae077b86fd
commit 2fa8202332
4 changed files with 50 additions and 3 deletions

View File

@ -51,6 +51,8 @@ void Riv3dWellLogPlanePartMgr::append3dWellLogCurvesToModel(cvf::ModelBasicList*
for (Rim3dWellLogCurve* rim3dWellLogCurve : rim3dWellLogCurves)
{
if (!rim3dWellLogCurve->toggleState()) continue;
cvf::ref<cvf::Drawable> curveDrawable = m_3dWellLogCurveGeometryGenerator->createCurveLine(displayCoordTransform, rim3dWellLogCurve);
caf::SurfaceEffectGenerator surfaceGen(cvf::Color4f(255, 0, 0, 0.5), caf::PO_1);

View File

@ -118,6 +118,16 @@ Rim3dWellLogCurve::~Rim3dWellLogCurve()
delete m_eclipseResultDefinition;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dWellLogCurve::updateCurveIn3dView()
{
RimProject* proj;
this->firstAncestorOrThisOfTypeAsserted(proj);
proj->createDisplayModelAndRedrawAllViews();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -155,6 +165,14 @@ Rim3dWellLogCurve::DrawPlane Rim3dWellLogCurve::drawPlane() const
return m_drawPlane();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool Rim3dWellLogCurve::toggleState() const
{
return m_showCurve;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -230,7 +248,16 @@ caf::PdmFieldHandle* Rim3dWellLogCurve::objectToggleField()
//--------------------------------------------------------------------------------------------------
void Rim3dWellLogCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
RimProject* proj;
this->firstAncestorOrThisOfTypeAsserted(proj);
if (changedField == &m_showCurve)
{
proj->reloadCompletionTypeResultsInAllViews();
}
else
{
proj->createDisplayModelAndRedrawAllViews();
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -64,9 +64,12 @@ public:
Rim3dWellLogCurve();
virtual ~Rim3dWellLogCurve();
void updateCurveIn3dView();
void setPropertiesFromView(Rim3dView* view);
DrawPlane drawPlane() const;
bool toggleState() const;
void resultValuesAndMds(std::vector<double>* resultValues, std::vector<double>* measuredDepthValues) const;

View File

@ -25,6 +25,8 @@
#include "RigEclipseCaseData.h"
#include "RigFlowDiagResultAddress.h"
#include "Rim3dView.h"
#include "Rim3dWellLogCurve.h"
#include "RimCellEdgeColors.h"
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
@ -33,12 +35,11 @@
#include "RimEclipseResultCase.h"
#include "RimEclipseView.h"
#include "RimFlowDiagSolution.h"
#include "RimGridTimeHistoryCurve.h"
#include "RimIntersectionCollection.h"
#include "RimPlotCurve.h"
#include "RimReservoirCellResultsStorage.h"
#include "Rim3dView.h"
#include "RimViewLinker.h"
#include "RimGridTimeHistoryCurve.h"
#include "RimWellLogExtractionCurve.h"
#include "cafPdmUiListEditor.h"
@ -336,6 +337,13 @@ void RimEclipseResultDefinition::updateAnyFieldHasChanged()
{
curve->updateConnectedEditors();
}
Rim3dWellLogCurve* rim3dWellLogCurve = nullptr;
this->firstAncestorOrThisOfType(rim3dWellLogCurve);
if (rim3dWellLogCurve)
{
rim3dWellLogCurve->updateConnectedEditors();
}
}
//--------------------------------------------------------------------------------------------------
@ -434,6 +442,13 @@ void RimEclipseResultDefinition::loadDataAndUpdate()
{
curve->loadDataAndUpdate(true);
}
Rim3dWellLogCurve* rim3dWellLogCurve = nullptr;
this->firstAncestorOrThisOfType(rim3dWellLogCurve);
if (rim3dWellLogCurve)
{
rim3dWellLogCurve->updateCurveIn3dView();
}
}
//--------------------------------------------------------------------------------------------------