Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
index 62042a62eef..f83b2ae7f2e 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable/src/org/eclipse/papyrus/infra/nattable/provider/TableSelectionProvider.java
@@ -198,9 +198,14 @@ public class TableSelectionProvider implements ISelectionProvider, IDisposable,
} else {
selection = calculateSelectionRowsAndColumnsWithoutTypeSelectionEvent(wrapper, event);
}
- newSelection = new TableStructuredSelection(selection.toArray(), wrapper);
+ // If no selection appended, the selection must be the context of the table
+ if(selection.isEmpty()){
+ newSelection = new TableStructuredSelection(manager.getTable().getContext(), wrapper);
+ }else{
+ newSelection = new TableStructuredSelection(selection.toArray(), wrapper);
+ }
} else {
- newSelection = new StructuredSelection();
+ newSelection = new StructuredSelection(manager.getTable().getContext());
}
setSelection(newSelection);
}

Back to the top