mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3479 Input Case : Missing entry in tree view for imported properties
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimTools.h"
|
||||
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
@@ -311,7 +312,7 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
|
||||
progInfo.setProgress(static_cast<int>(progress + inputPropCount));
|
||||
// Check if there are more known property keywords left on file. If it is, read them and create inputProperty objects
|
||||
|
||||
for (const QString fileKeyword : fileKeywordSet)
|
||||
for (const QString& fileKeyword : fileKeywordSet)
|
||||
{
|
||||
{
|
||||
QString resultName = this->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->makeResultNameUnique(fileKeyword);
|
||||
@@ -339,6 +340,14 @@ void RimEclipseInputCase::loadAndSyncronizeInputProperties()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseInputPropertyCollection* RimEclipseInputCase::inputPropertyCollection()
|
||||
{
|
||||
return m_inputPropertyCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -402,6 +411,16 @@ void RimEclipseInputCase::defineUiOrdering(QString uiConfigName, caf::PdmUiOrder
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseInputCase::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
||||
{
|
||||
uiTreeOrdering.add(&m_inputPropertyCollection);
|
||||
|
||||
RimEclipseCase::defineUiTreeOrdering(uiTreeOrdering, uiConfigName);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -45,22 +45,21 @@ public:
|
||||
RimEclipseInputCase();
|
||||
virtual ~RimEclipseInputCase();
|
||||
|
||||
// Fields
|
||||
caf::PdmChildField<RimEclipseInputPropertyCollection*> m_inputPropertyCollection;
|
||||
|
||||
// File open methods
|
||||
bool openDataFileSet(const QStringList& fileNames);
|
||||
void loadAndSyncronizeInputProperties();
|
||||
|
||||
RimEclipseInputPropertyCollection* inputPropertyCollection();
|
||||
|
||||
// RimCase overrides
|
||||
virtual bool openEclipseGridFile(); // Find grid file among file set. Read, Find read and validate property date. Syncronize child property sets.
|
||||
virtual void reloadEclipseGridFile();
|
||||
bool openEclipseGridFile() override;
|
||||
void reloadEclipseGridFile() override;
|
||||
|
||||
// Overrides from RimCase
|
||||
virtual QString locationOnDisc() const;
|
||||
virtual QString gridFileName() const { return m_gridFileName();}
|
||||
QString locationOnDisc() const override;
|
||||
QString gridFileName() const override { return m_gridFileName();}
|
||||
|
||||
virtual void updateFilePathsFromProjectPath(const QString& projectPath, const QString& oldProjectPath);
|
||||
void updateFilePathsFromProjectPath(const QString& projectPath, const QString& oldProjectPath) override;
|
||||
|
||||
void updateAdditionalFileFolder(const QString& newFolder);
|
||||
|
||||
@@ -69,11 +68,14 @@ private:
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "") override;
|
||||
|
||||
private:
|
||||
cvf::ref<RifReaderInterface> createMockModel(QString modelName);
|
||||
|
||||
private:
|
||||
// Fields
|
||||
caf::PdmChildField<RimEclipseInputPropertyCollection*> m_inputPropertyCollection;
|
||||
caf::PdmField<QString> m_gridFileName;
|
||||
caf::PdmProxyValueField< std::vector<QString> > m_additionalFiles;
|
||||
|
||||
|
||||
@@ -521,15 +521,15 @@ public:
|
||||
RimEclipseInputCase* inputRes = dynamic_cast<RimEclipseInputCase*>(m_currentReservoir);
|
||||
if (inputRes)
|
||||
{
|
||||
RimEclipseInputProperty* inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName);
|
||||
RimEclipseInputProperty* inputProperty = inputRes->inputPropertyCollection()->findInputProperty(m_currentPropertyName);
|
||||
if (!inputProperty)
|
||||
{
|
||||
inputProperty = new RimEclipseInputProperty;
|
||||
inputProperty->resultName = m_currentPropertyName;
|
||||
inputProperty->eclipseKeyword = "";
|
||||
inputProperty->fileName = "";
|
||||
inputRes->m_inputPropertyCollection->inputProperties.push_back(inputProperty);
|
||||
inputRes->m_inputPropertyCollection()->updateConnectedEditors();
|
||||
inputRes->inputPropertyCollection()->inputProperties.push_back(inputProperty);
|
||||
inputRes->inputPropertyCollection()->updateConnectedEditors();
|
||||
}
|
||||
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED_NOT_SAVED;
|
||||
}
|
||||
|
||||
@@ -641,15 +641,15 @@ public:
|
||||
RimEclipseInputCase* inputRes = dynamic_cast<RimEclipseInputCase*>(m_currentReservoir);
|
||||
if (inputRes)
|
||||
{
|
||||
RimEclipseInputProperty* inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName);
|
||||
RimEclipseInputProperty* inputProperty = inputRes->inputPropertyCollection()->findInputProperty(m_currentPropertyName);
|
||||
if (!inputProperty)
|
||||
{
|
||||
inputProperty = new RimEclipseInputProperty;
|
||||
inputProperty->resultName = m_currentPropertyName;
|
||||
inputProperty->eclipseKeyword = "";
|
||||
inputProperty->fileName = "";
|
||||
inputRes->m_inputPropertyCollection->inputProperties.push_back(inputProperty);
|
||||
inputRes->m_inputPropertyCollection()->updateConnectedEditors();
|
||||
inputRes->inputPropertyCollection()->inputProperties.push_back(inputProperty);
|
||||
inputRes->inputPropertyCollection()->updateConnectedEditors();
|
||||
}
|
||||
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED_NOT_SAVED;
|
||||
}
|
||||
@@ -1005,15 +1005,15 @@ public:
|
||||
RimEclipseInputCase* inputRes = dynamic_cast<RimEclipseInputCase*>(m_currentReservoir);
|
||||
if (inputRes)
|
||||
{
|
||||
RimEclipseInputProperty* inputProperty = inputRes->m_inputPropertyCollection->findInputProperty(m_currentPropertyName);
|
||||
RimEclipseInputProperty* inputProperty = inputRes->inputPropertyCollection()->findInputProperty(m_currentPropertyName);
|
||||
if (!inputProperty)
|
||||
{
|
||||
inputProperty = new RimEclipseInputProperty;
|
||||
inputProperty->resultName = m_currentPropertyName;
|
||||
inputProperty->eclipseKeyword = "";
|
||||
inputProperty->fileName = "";
|
||||
inputRes->m_inputPropertyCollection->inputProperties.push_back(inputProperty);
|
||||
inputRes->m_inputPropertyCollection()->updateConnectedEditors();
|
||||
inputRes->inputPropertyCollection()->inputProperties.push_back(inputProperty);
|
||||
inputRes->inputPropertyCollection()->updateConnectedEditors();
|
||||
}
|
||||
inputProperty->resolvedState = RimEclipseInputProperty::RESOLVED_NOT_SAVED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user