#2001 RFT plot. Use only TVD depth type

This commit is contained in:
Bjørn Erik Jensen 2017-10-16 14:01:45 +02:00
parent 4ca757f1b5
commit 9c0fa50834
3 changed files with 32 additions and 0 deletions

View File

@ -71,6 +71,7 @@ RimWellRftPlot::RimWellRftPlot()
CAF_PDM_InitFieldNoDefault(&m_wellLogPlot, "WellLog", "WellLog", "", "", "");
m_wellLogPlot.uiCapability()->setUiHidden(true);
m_wellLogPlot = new RimWellLogPlot();
m_wellLogPlot->setDepthType(RimWellLogPlot::TRUE_VERTICAL_DEPTH);
CAF_PDM_InitFieldNoDefault(&m_wellName, "WellName", "WellName", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_branchIndex, "BranchIndex", "BranchIndex", "", "", "");

View File

@ -34,6 +34,7 @@
#include "cvfAssert.h"
#include <math.h>
#include "RimWellRftPlot.h"
#define RI_LOGPLOT_MINDEPTH_DEFAULT 0.0
#define RI_LOGPLOT_MAXDEPTH_DEFAULT 1000.0
@ -124,6 +125,7 @@ void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
RimWellAllocationPlot* wellAllocPlot;
firstAncestorOrThisOfType(wellAllocPlot);
if (wellAllocPlot) wellAllocPlot->loadDataAndUpdate();
else if (isRftPlotChild()) rftPlot()->loadDataAndUpdate();
else updateTracks();
}
if ( changedField == &m_depthUnit)
@ -152,6 +154,7 @@ QList<caf::PdmOptionItemInfo> RimWellLogPlot::calculateValueOptions(const caf::P
for (size_t i = 0; i < DepthAppEnum::size(); ++i)
{
DepthTypeEnum enumVal = DepthAppEnum::fromIndex(i);
if (m_disabledDepthTypes.count( enumVal) == 0)
{
options.push_back(caf::PdmOptionItemInfo(DepthAppEnum::uiText(enumVal), enumVal));
@ -471,6 +474,24 @@ QString RimWellLogPlot::asciiDataForPlotExport() const
return out;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellRftPlot* RimWellLogPlot::rftPlot() const
{
RimWellRftPlot* rftPlot;
firstAncestorOrThisOfType(rftPlot);
return rftPlot;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellLogPlot::isRftPlotChild() const
{
return rftPlot() != nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -777,6 +798,12 @@ void RimWellLogPlot::updateDisabledDepthTypes()
m_depthType = CONNECTION_NUMBER;
}
}
else if (isRftPlotChild())
{
m_disabledDepthTypes.insert(MEASURED_DEPTH);
m_disabledDepthTypes.insert(PSEUDO_LENGTH);
m_disabledDepthTypes.insert(CONNECTION_NUMBER);
}
else
{
m_disabledDepthTypes.insert(PSEUDO_LENGTH);

View File

@ -31,6 +31,7 @@
class RiuWellLogPlot;
class RimWellLogTrack;
class RimWellRftPlot;
//==================================================================================================
@ -101,6 +102,9 @@ public:
QString asciiDataForPlotExport() const;
RimWellRftPlot* rftPlot() const;
bool isRftPlotChild() const;
protected:
// Overridden PDM methods