#1763 Hide soursim file field and result category if HDF5 support is not compiled in

This commit is contained in:
Bjørnar Grip Fjær 2017-08-11 15:49:38 +02:00
parent 63bb85b998
commit 6747289a89
3 changed files with 11 additions and 3 deletions

View File

@ -494,7 +494,7 @@ void RifReaderEclipseOutput::setHdf5FileName(const QString& fileName)
if (hdfTimeSteps.size() != m_timeSteps.size())
{
RiaLogging::error("HDF: Time step count does not match");
RiaLogging::error(QString("HDF: Elicpse count %1").arg(m_timeSteps.size()));
RiaLogging::error(QString("HDF: Eclipse count %1").arg(m_timeSteps.size()));
RiaLogging::error(QString("HDF: HDF count %1").arg(hdfTimeSteps.size()));
return;
@ -509,7 +509,7 @@ void RifReaderEclipseOutput::setHdf5FileName(const QString& fileName)
QString dateStr("yyyy.MMM.ddd hh:mm");
RiaLogging::error(QString("HDF: Elicpse date %1").arg(m_timeSteps[i].toString(dateStr)));
RiaLogging::error(QString("HDF: Eclipse date %1").arg(m_timeSteps[i].toString(dateStr)));
RiaLogging::error(QString("HDF: HDF date %1").arg(hdfTimeSteps[i].toString(dateStr)));
isTimeStampsEqual = false;

View File

@ -77,6 +77,9 @@ RimEclipseResultCase::RimEclipseResultCase()
CAF_PDM_InitField(&m_sourSimFileName, "SourSimFileName", QString(), "SourSim File Name", "", "", "");
m_sourSimFileName.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
#ifndef USE_HDF5
m_sourSimFileName.uiCapability()->setUiHidden(true);
#endif
m_activeCellInfoIsReadFromFile = false;
m_gridAndWellDataIsReadFromFile = false;

View File

@ -430,11 +430,16 @@ QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(
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
if ( !hasFlowDiagFluxes || timeHistoryCurve != nullptr || !hasSourSimRLFile)
{
using ResCatEnum = caf::AppEnum< RimDefines::ResultCatType >;