mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
Bugfix - getting correct pointer for parent case group
Getting the parent field's owner object instead of the owner of this. Removed some out-commented TODO code/comments.
This commit is contained in:
parent
90762d0f0f
commit
f45c50fb43
@ -49,19 +49,7 @@ RimCaseCollection::~RimCaseCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimIdenticalGridCaseGroup* RimCaseCollection::parentCaseGroup()
|
||||
{
|
||||
// MODTODO Remove
|
||||
/*
|
||||
std::vector<RimIdenticalGridCaseGroup*> parentObjects;
|
||||
this->parentObjectsOfType(parentObjects);
|
||||
|
||||
if (parentObjects.size() > 0)
|
||||
{
|
||||
return parentObjects[0];
|
||||
}
|
||||
*/
|
||||
RimIdenticalGridCaseGroup* parentObject = dynamic_cast<RimIdenticalGridCaseGroup*>(this->owner());
|
||||
|
||||
return parentObject;
|
||||
return dynamic_cast<RimIdenticalGridCaseGroup*>(this->parentField()->ownerObject());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -299,17 +299,6 @@ void RimEclipseCase::computeCachedData()
|
||||
RimCaseCollection* RimEclipseCase::parentCaseCollection()
|
||||
{
|
||||
return dynamic_cast<RimCaseCollection*>(this->parentField()->ownerObject());
|
||||
/*
|
||||
std::vector<RimCaseCollection*> parentObjects;
|
||||
this->parentObjectsOfType(parentObjects);
|
||||
|
||||
if (parentObjects.size() > 0)
|
||||
{
|
||||
return parentObjects[0];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
*/
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -162,19 +162,6 @@ bool RimEclipseStatisticsCase::openEclipseGridFile()
|
||||
RimCaseCollection* RimEclipseStatisticsCase::parentStatisticsCaseCollection()
|
||||
{
|
||||
return dynamic_cast<RimCaseCollection*>(this->parentField()->ownerObject());
|
||||
|
||||
// MODTODO Remove
|
||||
/*
|
||||
std::vector<RimCaseCollection*> parentObjects;
|
||||
this->parentObjectsOfType(parentObjects);
|
||||
|
||||
if (parentObjects.size() > 0)
|
||||
{
|
||||
return parentObjects[0];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
*/
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user