mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Create UI tree items and insert in parent when opening new cases from file. Avoid building the complete tree using onProjectOpenedOrClosed()
p4#: 21357
This commit is contained in:
@@ -518,7 +518,13 @@ bool RiaApplication::openEclipseCase(const QString& caseName, const QString& cas
|
||||
riv->cellResult()->resultVariable = RimDefines::undefinedResultName();
|
||||
}
|
||||
|
||||
onProjectOpenedOrClosed();
|
||||
RimUiTreeModelPdm* uiModel = RiuMainWindow::instance()->uiPdmModel();
|
||||
caf::PdmUiTreeItem* projectTreeItem = uiModel->treeItemRoot();
|
||||
|
||||
// New case is inserted before the last item, the script item
|
||||
int position = projectTreeItem->childCount() - 1;
|
||||
|
||||
uiModel->addToParentAndBuildUiItems(projectTreeItem, position, rimResultReservoir);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -547,7 +553,13 @@ bool RiaApplication::openInputEclipseCase(const QString& caseName, const QString
|
||||
riv->cellResult()->resultVariable = RimDefines::undefinedResultName();
|
||||
}
|
||||
|
||||
onProjectOpenedOrClosed();
|
||||
RimUiTreeModelPdm* uiModel = RiuMainWindow::instance()->uiPdmModel();
|
||||
caf::PdmUiTreeItem* projectTreeItem = uiModel->treeItemRoot();
|
||||
|
||||
// New case is inserted before the last item, the script item
|
||||
int position = projectTreeItem->childCount() - 1;
|
||||
|
||||
uiModel->addToParentAndBuildUiItems(projectTreeItem, position, rimInputReservoir);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user