mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-26 16:26:48 -06:00
Use -1 as argument when adding children, as they always must be appended to collection
p4#: 20978
This commit is contained in:
parent
50206b9dc4
commit
c9b4376d8c
@ -426,6 +426,7 @@ PdmUiTreeItem* UiTreeItemBuilderPdm::buildViewItems(PdmUiTreeItem* parentTreeIte
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// NOTE: if position is -1, the item is appended to the parent tree item
|
||||
PdmUiTreeItem* objectTreeItem = new PdmUiTreeItem(parentTreeItem, position, object);
|
||||
|
||||
std::vector<caf::PdmFieldHandle*> fields;
|
||||
@ -445,7 +446,8 @@ PdmUiTreeItem* UiTreeItemBuilderPdm::buildViewItems(PdmUiTreeItem* parentTreeIte
|
||||
caf::PdmObject* childObj = children[i];
|
||||
assert(childObj);
|
||||
|
||||
UiTreeItemBuilderPdm::buildViewItems(objectTreeItem, position, childObj);
|
||||
// NOTE: -1 as second argument indicates that child objects will be appended to collection
|
||||
UiTreeItemBuilderPdm::buildViewItems(objectTreeItem, -1, childObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user