#3152 Observed data import. Fix accumulated data determination

This commit is contained in:
Bjørn Erik Jensen
2018-07-09 10:43:53 +02:00
parent 3bc595dcb2
commit 19ce35432c
2 changed files with 34 additions and 3 deletions

View File

@@ -717,8 +717,39 @@ bool RifEclipseSummaryAddress::isValid() const
//--------------------------------------------------------------------------------------------------
bool RifEclipseSummaryAddress::hasAccumulatedData() const
{
return QString::fromStdString(m_quantityName).endsWith("T") ||
QString::fromStdString(m_quantityName).endsWith("TH");
if (!isValidEclipseCategory()) return false;
QString qBaseName = QString::fromStdString(quantityName());
if (qBaseName.size() == 8) qBaseName.chop(3);
while (qBaseName.endsWith("_")) qBaseName.chop(1);
return qBaseName.endsWith("T") || qBaseName.endsWith("TH");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RifEclipseSummaryAddress::isValidEclipseCategory() const
{
switch (category())
{
case SUMMARY_FIELD:
case SUMMARY_AQUIFER:
case SUMMARY_NETWORK:
case SUMMARY_MISC:
case SUMMARY_REGION:
case SUMMARY_REGION_2_REGION:
case SUMMARY_WELL_GROUP:
case SUMMARY_WELL:
case SUMMARY_WELL_COMPLETION:
case SUMMARY_WELL_LGR:
case SUMMARY_WELL_COMPLETION_LGR:
case SUMMARY_WELL_SEGMENT:
case SUMMARY_BLOCK:
case SUMMARY_BLOCK_LGR:
return true;
}
return false;
}
//--------------------------------------------------------------------------------------------------