Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jastram2013-01-07 16:14:59 +0000
committerMichael Jastram2013-01-07 16:14:59 +0000
commit44d31dbd7465ca5383116e2f307dba0f9d07f3e4 (patch)
tree2e6d255b22f2dbde15287a226e5dce2f48f5b13e
parent916f75a85d9c11ebbc06d516b549a10685d8f498 (diff)
downloadorg.eclipse.rmf-44d31dbd7465ca5383116e2f307dba0f9d07f3e4.tar.gz
org.eclipse.rmf-44d31dbd7465ca5383116e2f307dba0f9d07f3e4.tar.xz
org.eclipse.rmf-44d31dbd7465ca5383116e2f307dba0f9d07f3e4.zip
ASSIGNED - bug 369457: Creation of new SpecObjects in an empty
Specification is not intuitive https://bugs.eclipse.org/bugs/show_bug.cgi?id=369457 With this fix, the context menu is correct.
-rw-r--r--org.eclipse.rmf.reqif10.pror.editor/src/org/eclipse/rmf/reqif10/pror/editor/agilegrid/ProrAgileGridViewer.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.rmf.reqif10.pror.editor/src/org/eclipse/rmf/reqif10/pror/editor/agilegrid/ProrAgileGridViewer.java b/org.eclipse.rmf.reqif10.pror.editor/src/org/eclipse/rmf/reqif10/pror/editor/agilegrid/ProrAgileGridViewer.java
index 4bd88b56..7ee69ca2 100644
--- a/org.eclipse.rmf.reqif10.pror.editor/src/org/eclipse/rmf/reqif10/pror/editor/agilegrid/ProrAgileGridViewer.java
+++ b/org.eclipse.rmf.reqif10.pror.editor/src/org/eclipse/rmf/reqif10/pror/editor/agilegrid/ProrAgileGridViewer.java
@@ -460,6 +460,15 @@ public class ProrAgileGridViewer extends Viewer {
}
}
}
+
+ // If there are no items, it either means that (1) The user
+ // explicitly unselected everything, or (2) The user clicked in
+ // the empty space below the rows. In case of (2), we would like
+ // the Specification to be the current selection.
+ if (items.size() == 0) {
+ items.add(getInput());
+ }
+
selection = new StructuredSelection(items);
ProrAgileGridViewer.this
.fireSelectionChanged(new org.eclipse.jface.viewers.SelectionChangedEvent(

Back to the top