Merge remote-tracking branch 'origin/hdf-prototype' into dev

This commit is contained in:
Magne Sjaastad
2017-08-17 07:30:01 +02:00
632 changed files with 9748 additions and 3722 deletions

View File

@@ -426,27 +426,46 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
if ( fieldNeedingOptions == &m_resultTypeUiField )
{
bool hasSourSimRLFile = false;
RimEclipseResultCase* eclResCase = dynamic_cast<RimEclipseResultCase*>(m_eclipseCase.p());
if ( eclResCase && eclResCase->eclipseCaseData() )
{
hasSourSimRLFile = eclResCase->hasSourSimFile();
}
#ifndef USE_HDF5
// If using ResInsight without HDF5 support, ignore SourSim files and
// do not show it as a result category.
hasSourSimRLFile = false;
#endif
RimGridTimeHistoryCurve* timeHistoryCurve;
this->firstAncestorOrThisOfType(timeHistoryCurve);
// Do not include flow diagnostics results if not available or is a time history curve
// Do not include flow diagnostics results if it is a time history curve
if ( timeHistoryCurve != nullptr )
{
using ResCatEnum = caf::AppEnum< RiaDefines::ResultCatType >;
for ( size_t i = 0; i < ResCatEnum::size(); ++i )
{
RiaDefines::ResultCatType resType = ResCatEnum::fromIndex(i);
if ( resType != RiaDefines::FLOW_DIAGNOSTICS )
if ( resType == RiaDefines::FLOW_DIAGNOSTICS
&& (timeHistoryCurve) )
{
QString uiString = ResCatEnum::uiTextFromIndex(i);
options.push_back(caf::PdmOptionItemInfo(uiString, resType));
continue;
}
if ( resType == RiaDefines::SOURSIMRL
&& (!hasSourSimRLFile ) )
{
continue;
}
QString uiString = ResCatEnum::uiTextFromIndex(i);
options.push_back(caf::PdmOptionItemInfo(uiString, resType));
}
}
else
{
// Do nothing, and thereby use the defaults of the AppEnum field
}
}
if ( m_resultTypeUiField() != RiaDefines::FLOW_DIAGNOSTICS )
@@ -858,6 +877,10 @@ bool RimEclipseResultDefinition::hasDynamicResult() const
{
return true;
}
else if (m_resultType() == RiaDefines::SOURSIMRL)
{
return true;
}
else if (m_resultType() == RiaDefines::FLOW_DIAGNOSTICS)
{
return true;