diff options
Diffstat (limited to 'plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java')
-rw-r--r-- | plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java index d3e00595c7a..a23a3fa660f 100644 --- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java +++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/PasteInSelectionTreeNattableCommandProvider.java @@ -282,7 +282,11 @@ public class PasteInSelectionTreeNattableCommandProvider extends PasteInSelectio for (int insertedElementIndex = createdElements.size() - 1; insertedElementIndex >= 0; insertedElementIndex--) { final InsertedElementInNattable currentInsertedElement = createdElements.get(insertedElementIndex); if (-1 != currentInsertedElement.getIndexInParent()) { - addCommand.append(MoveCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), currentInsertedElement.getCreatedElements(), currentInsertedElement.getIndexInParent())); + int addedIndex = 0; + for(Object createdElement : currentInsertedElement.getCreatedElements()){ + addCommand.append(MoveCommand.create(contextEditingDomain, currentInsertedElement.getContext(), currentInsertedElement.getContainementFeature(), createdElement, currentInsertedElement.getIndexInParent()+addedIndex)); + addedIndex++; + } } } |