#2129 Rft/Plt plot: Show formations on default, and not always

This commit is contained in:
Rebecca Cox 2017-11-13 08:56:22 +01:00
parent a4484579e2
commit da7c817023
4 changed files with 22 additions and 7 deletions

View File

@ -128,6 +128,7 @@ RimWellPltPlot::RimWellPltPlot()
this->setAsPlotMdiWindow();
m_doInitAfterLoad = false;
m_isOnLoad = true;
}
//--------------------------------------------------------------------------------------------------
@ -1256,11 +1257,6 @@ void RimWellPltPlot::initAfterLoad()
}
}
m_selectedSources = std::vector<RifWellRftAddress>(selectedSources.begin(), selectedSources.end());
if( m_wellLogPlot->trackCount() > 0);
{
m_wellLogPlot->trackByIndex(0)->setShowFormations(true);
}
}
//--------------------------------------------------------------------------------------------------
@ -1444,6 +1440,15 @@ void RimWellPltPlot::onLoadDataAndUpdate()
m_doInitAfterLoad = false;
}
if (m_isOnLoad)
{
if (m_wellLogPlot->trackCount() > 0)
{
m_wellLogPlot->trackByIndex(0)->setShowFormations(true);
}
m_isOnLoad = false;
}
updateMdiWindowVisibility();
updateFormationsOnPlot();
syncCurvesFromUiSelection();

View File

@ -161,4 +161,5 @@ private:
caf::PdmField<std::vector<caf::AppEnum<FlowPhase>>> m_phases;
bool m_doInitAfterLoad;
bool m_isOnLoad;
};

View File

@ -98,6 +98,7 @@ RimWellRftPlot::RimWellRftPlot()
this->setAsPlotMdiWindow();
m_selectedSourcesOrTimeStepsFieldsChanged = false;
m_isOnLoad = true;
}
//--------------------------------------------------------------------------------------------------
@ -258,8 +259,6 @@ void RimWellRftPlot::updateFormationsOnPlot() const
{
if (m_wellLogPlot->trackCount() > 0)
{
m_wellLogPlot->trackByIndex(0)->setShowFormations(true);
RimProject* proj = RiaApplication::instance()->project();
RimWellPath* wellPath = proj->wellPathByName(m_wellPathNameOrSimWellName);
@ -1042,6 +1041,15 @@ QString RimWellRftPlot::description() const
//--------------------------------------------------------------------------------------------------
void RimWellRftPlot::onLoadDataAndUpdate()
{
if (m_isOnLoad)
{
if (m_wellLogPlot->trackCount() > 0)
{
m_wellLogPlot->trackByIndex(0)->setShowFormations(true);
}
m_isOnLoad = false;
}
updateMdiWindowVisibility();
updateFormationsOnPlot();
m_wellLogPlot->loadDataAndUpdate();

View File

@ -149,4 +149,5 @@ private:
std::map<QDateTime, std::set<RifWellRftAddress>> m_timeStepsToAddresses;
bool m_selectedSourcesOrTimeStepsFieldsChanged;
bool m_isOnLoad;
};