Skip to content

Commit 84f4fbd

Browse files
committed
Increment the index after the element was added to the list
Currently elements are merged in reverse order if an insert index is give because the add is always performed at the original index. This now do the following: - on each insert operation the index is incremented if given - if the index is larger than the list size the element is added instead.
1 parent c56d328 commit 84f4fbd

File tree

1 file changed

+1
-0
lines changed
  • bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/internal

1 file changed

+1
-0
lines changed

bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/internal/ModelUtils.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ private static void mergeList(List<MApplicationElement> list, List<MApplicationE
198198
list.add(element);
199199
} else {
200200
list.add(index, element);
201+
index++;
201202
}
202203
}
203204
}

0 commit comments

Comments
 (0)