mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-10 08:03:05 -06:00
#1727 Reload summary case: A new file reader will be created on reload
This commit is contained in:
parent
b7ac93a905
commit
788ac2c8a8
@ -41,7 +41,11 @@ RifReaderEclipseSummary::RifReaderEclipseSummary()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RifReaderEclipseSummary::~RifReaderEclipseSummary()
|
RifReaderEclipseSummary::~RifReaderEclipseSummary()
|
||||||
{
|
{
|
||||||
close();
|
if (m_ecl_sum)
|
||||||
|
{
|
||||||
|
ecl_sum_free(m_ecl_sum);
|
||||||
|
m_ecl_sum = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -87,15 +91,6 @@ bool RifReaderEclipseSummary::open(const std::string& headerFileName, const std:
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RifReaderEclipseSummary::close()
|
|
||||||
{
|
|
||||||
if (m_ecl_sum)
|
|
||||||
{
|
|
||||||
ecl_sum_free(m_ecl_sum);
|
|
||||||
m_ecl_sum = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RifEclipseSummaryAddress addressFromErtSmSpecNode(const smspec_node_type * ertSumVarNode)
|
RifEclipseSummaryAddress addressFromErtSmSpecNode(const smspec_node_type * ertSumVarNode)
|
||||||
{
|
{
|
||||||
if ( smspec_node_get_var_type(ertSumVarNode) == ECL_SMSPEC_INVALID_VAR
|
if ( smspec_node_get_var_type(ertSumVarNode) == ECL_SMSPEC_INVALID_VAR
|
||||||
|
@ -41,7 +41,6 @@ public:
|
|||||||
~RifReaderEclipseSummary();
|
~RifReaderEclipseSummary();
|
||||||
|
|
||||||
bool open(const std::string& headerFileName, const std::vector<std::string>& dataFileNames);
|
bool open(const std::string& headerFileName, const std::vector<std::string>& dataFileNames);
|
||||||
void close();
|
|
||||||
|
|
||||||
bool hasAddress(const RifEclipseSummaryAddress& resultAddress);
|
bool hasAddress(const RifEclipseSummaryAddress& resultAddress);
|
||||||
const std::vector<RifEclipseSummaryAddress>& allResultAddresses();
|
const std::vector<RifEclipseSummaryAddress>& allResultAddresses();
|
||||||
|
@ -50,14 +50,7 @@ void RigSummaryCaseData::openOrReloadCase(const QString& summaryHeaderFileName)
|
|||||||
std::string nativeSumHeadFileName = QDir::toNativeSeparators(summaryHeaderFileName).toStdString();
|
std::string nativeSumHeadFileName = QDir::toNativeSeparators(summaryHeaderFileName).toStdString();
|
||||||
RifEclipseSummaryTools::findSummaryFiles(nativeSumHeadFileName, &headerFileName, &dataFileNames);
|
RifEclipseSummaryTools::findSummaryFiles(nativeSumHeadFileName, &headerFileName, &dataFileNames);
|
||||||
|
|
||||||
if (m_summaryFileReader.isNull())
|
m_summaryFileReader = new RifReaderEclipseSummary();
|
||||||
{
|
|
||||||
m_summaryFileReader = new RifReaderEclipseSummary();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_summaryFileReader->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!m_summaryFileReader->open(headerFileName, dataFileNames))
|
if (!m_summaryFileReader->open(headerFileName, dataFileNames))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user