mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-09 23:53:04 -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()
|
||||
{
|
||||
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)
|
||||
{
|
||||
if ( smspec_node_get_var_type(ertSumVarNode) == ECL_SMSPEC_INVALID_VAR
|
||||
|
@ -41,7 +41,6 @@ public:
|
||||
~RifReaderEclipseSummary();
|
||||
|
||||
bool open(const std::string& headerFileName, const std::vector<std::string>& dataFileNames);
|
||||
void close();
|
||||
|
||||
bool hasAddress(const RifEclipseSummaryAddress& resultAddress);
|
||||
const std::vector<RifEclipseSummaryAddress>& allResultAddresses();
|
||||
|
@ -50,14 +50,7 @@ void RigSummaryCaseData::openOrReloadCase(const QString& summaryHeaderFileName)
|
||||
std::string nativeSumHeadFileName = QDir::toNativeSeparators(summaryHeaderFileName).toStdString();
|
||||
RifEclipseSummaryTools::findSummaryFiles(nativeSumHeadFileName, &headerFileName, &dataFileNames);
|
||||
|
||||
if (m_summaryFileReader.isNull())
|
||||
{
|
||||
m_summaryFileReader = new RifReaderEclipseSummary();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_summaryFileReader->close();
|
||||
}
|
||||
m_summaryFileReader = new RifReaderEclipseSummary();
|
||||
|
||||
if (!m_summaryFileReader->open(headerFileName, dataFileNames))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user