mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
One shared active cell info for all statistical cases
Invalidate existing statisticsCases when adding/removing source cases Moved computation of active cell union from RigStatistics to RimIdenticalGridCaseGroup Recompute active cell union when opening project file p4#: 21023
This commit is contained in:
@@ -480,21 +480,22 @@ RimStatisticalCalculation* RimUiTreeModelPdm::addStatisticalCalculation(const QM
|
||||
caf::PdmUiTreeItem* currentItem = getTreeItemFromIndex(itemIndex);
|
||||
|
||||
QModelIndex collectionIndex;
|
||||
RimStatisticalCollection* caseGroup = NULL;
|
||||
RimIdenticalGridCaseGroup* caseGroup = NULL;
|
||||
caf::PdmUiTreeItem* parentCollectionItem = NULL;
|
||||
int position = 0;
|
||||
|
||||
if (dynamic_cast<RimStatisticalCalculation*>(currentItem->dataObject().p()))
|
||||
{
|
||||
RimStatisticalCalculation* currentObject = dynamic_cast<RimStatisticalCalculation*>(currentItem->dataObject().p());
|
||||
caseGroup = currentObject->parentStatisticalCollection();
|
||||
caseGroup = currentObject->parentStatisticalCollection()->parentCaseGroup();
|
||||
parentCollectionItem = currentItem->parent();
|
||||
position = itemIndex.row();
|
||||
collectionIndex = itemIndex.parent();
|
||||
}
|
||||
else if (dynamic_cast<RimStatisticalCollection*>(currentItem->dataObject().p()))
|
||||
{
|
||||
caseGroup = dynamic_cast<RimStatisticalCollection*>(currentItem->dataObject().p());
|
||||
RimStatisticalCollection* statColl = dynamic_cast<RimStatisticalCollection*>(currentItem->dataObject().p());
|
||||
caseGroup = statColl->parentCaseGroup();
|
||||
parentCollectionItem = currentItem;
|
||||
position = parentCollectionItem->childCount();
|
||||
collectionIndex = itemIndex;
|
||||
|
||||
Reference in New Issue
Block a user