mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Insert new case group before script item
p4#: 20964
This commit is contained in:
parent
75fc89e67a
commit
414172cf78
@ -513,7 +513,8 @@ RimIdenticalGridCaseGroup* RimUiTreeModelPdm::addCaseGroup(const QModelIndex& it
|
|||||||
QModelIndex rootIndex = itemIndex.parent();
|
QModelIndex rootIndex = itemIndex.parent();
|
||||||
caf::PdmUiTreeItem* rootTreeItem = currentItem->parent();
|
caf::PdmUiTreeItem* rootTreeItem = currentItem->parent();
|
||||||
|
|
||||||
int position = rootTreeItem->childCount();
|
// New case group is inserted before the last item, the script item
|
||||||
|
int position = rootTreeItem->childCount() - 1;
|
||||||
|
|
||||||
beginInsertRows(rootIndex, position, position);
|
beginInsertRows(rootIndex, position, position);
|
||||||
|
|
||||||
@ -524,6 +525,8 @@ RimIdenticalGridCaseGroup* RimUiTreeModelPdm::addCaseGroup(const QModelIndex& it
|
|||||||
|
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
|
|
||||||
|
rebuildUiSubTree(createdObject);
|
||||||
|
|
||||||
insertedModelIndex = index(position, 0, rootIndex);
|
insertedModelIndex = index(position, 0, rootIndex);
|
||||||
|
|
||||||
return createdObject;
|
return createdObject;
|
||||||
|
Loading…
Reference in New Issue
Block a user