mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge remote-tracking branch 'origin/hdf-prototype' into dev
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user