#2077 Well Allocation Plot: Move formation logic from track to plot

This commit is contained in:
Rebecca Cox
2017-11-06 13:40:17 +01:00
parent bac2d2b4b2
commit e0b0fb1c13
2 changed files with 16 additions and 1 deletions

View File

@@ -248,7 +248,7 @@ void RimWellAllocationPlot::updateFromWell()
RimWellLogTrack* plotTrack = new RimWellLogTrack();
plotTrack->setDescription(QString("Branch %1").arg(brIdx + 1));
plotTrack->setBranchIndex((int)brIdx);
plotTrack->setFormationBranchIndex((int)brIdx);
accumulatedWellFlowPlot()->addTrack(plotTrack);
@@ -793,6 +793,7 @@ void RimWellAllocationPlot::onLoadDataAndUpdate()
updateMdiWindowVisibility();
updateFromWell();
m_accumulatedWellFlowPlot->loadDataAndUpdate();
updateFormationNamesData();
}
//--------------------------------------------------------------------------------------------------
@@ -816,3 +817,15 @@ cvf::Color3f RimWellAllocationPlot::getTracerColor(const QString& tracerName)
return cvf::Color3f::DARK_GRAY;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellAllocationPlot::updateFormationNamesData() const
{
for (size_t i = 0; i < m_accumulatedWellFlowPlot->trackCount(); ++i)
{
RimWellLogTrack* track = m_accumulatedWellFlowPlot->trackByIndex(i);
track->updateFormationNamesData(m_case, RimWellLogTrack::SIMULATION_WELL, nullptr, m_wellName, track->formationBranchIndex());
}
}

View File

@@ -118,6 +118,8 @@ private:
cvf::Color3f getTracerColor(const QString& tracerName);
void updateFormationNamesData() const;
private:
caf::PdmField<bool> m_showPlotTitle;
caf::PdmField<QString> m_userName;