#2002 RFT Plot: Add visible x range and new logic for formations

This commit is contained in:
Rebecca Cox
2017-11-03 08:58:08 +01:00
parent 40b7f99de3
commit 95f7f40b15
4 changed files with 33 additions and 99 deletions

View File

@@ -94,9 +94,6 @@ RimWellRftPlot::RimWellRftPlot()
m_selectedTimeSteps.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::HIDDEN);
m_selectedTimeSteps.uiCapability()->setAutoAddingOptionFromValue(false);
CAF_PDM_InitField(&m_showFormations, "ShowFormations", false, "Show Formations", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_formationCase, "FormationCase", "Formation Case", "", "", "");
this->setAsPlotMdiWindow();
m_selectedSourcesOrTimeStepsFieldsChanged = false;
}
@@ -1085,15 +1082,6 @@ QList<caf::PdmOptionItemInfo> RimWellRftPlot::calculateValueOptions(const caf::P
options.push_front(caf::PdmOptionItemInfo("None", -1));
}
}
else if (fieldNeedingOptions == &m_formationCase)
{
for (RifWellRftAddress source : selectedSources())
{
RifWellRftAddress addr = RifWellRftAddress(RifWellRftAddress::RFT, source.eclCase());
//caf::PdmOptionItemInfo item = caf::PdmOptionItemInfo(source.eclCase()->caseUserDescription(), QVariant::fromValue(addr));
options.push_back(caf::PdmOptionItemInfo(source.eclCase()->caseUserDescription(), source.eclCase(), false, source.eclCase()->uiIcon()));
}
}
return options;
}
@@ -1136,39 +1124,6 @@ void RimWellRftPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
{
//m_wellLogPlot->setShowDescription(m_showPlotTitle);
}
else if (changedField == &m_showFormations)
{
if (m_wellLogPlot->trackCount())
{
RimWellLogTrack* track = m_wellLogPlot->trackByIndex(0);
if (m_formationCase != nullptr)
{
track->setCase(m_formationCase());
}
else if (!m_selectedSources().empty())
{
m_formationCase = m_selectedSources().at(0).eclCase();
track->setCase(m_formationCase);
}
if (!m_wellName().isEmpty())
{
track->setSimWellName(m_wellName);
}
track->setBranchIndex(m_branchIndex());
track->setShowFormations(m_showFormations());
}
}
else if (changedField == &m_formationCase)
{
if (m_wellLogPlot->trackCount())
{
RimWellLogTrack* track = m_wellLogPlot->trackByIndex(0);
updateConnectedEditors();
}
}
}
//--------------------------------------------------------------------------------------------------
@@ -1215,10 +1170,12 @@ void RimWellRftPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
//uiOrdering.add(&m_showPlotTitle);
caf::PdmUiGroup* formationGroup = uiOrdering.addNewGroup("Formation Names Properties");
formationGroup->add(&m_showFormations);
formationGroup->add(&m_formationCase);
if (m_wellLogPlot && m_wellLogPlot->trackCount() > 0)
{
RimWellLogTrack* track = m_wellLogPlot->trackByIndex(0);
track->uiOrderingForShowFormationNamesAndCase(uiConfigName, uiOrdering);
track->uiOrderingForVisibleXRange(uiConfigName, uiOrdering);
}
uiOrdering.skipRemainingFields(true);
}

View File

@@ -166,8 +166,5 @@ private:
std::map<QDateTime, std::set<RifWellRftAddress>> m_timeStepsToAddresses;
caf::PdmField<bool> m_showFormations;
caf::PdmPtrField<RimCase*> m_formationCase;
bool m_selectedSourcesOrTimeStepsFieldsChanged;
};