eclipsesource / papyrus-gefx

A new Editor kind for Papyrus, based on GEFx and GMF Runtime
0 stars 2 forks source link

[Interactions] Fix Marquee Selection: Diagram Content Part shouldn't be included in the selection #33

Open CamilleLetavernier opened 5 years ago

CamilleLetavernier commented 5 years ago

Our custom MarqueeOnDragHandler extends the GEF one (org.eclipse.gef.mvc.fx.handlers.MarqueeOnDragHandler), but is not 100% compatible with it. Especially, we don't support empty selection in Papyrus (We always select the diagram content part if there is no other selection). However, GEF's MarqueeOnDragHandler (And especially SelectionOperation) always prepends the selection to whatever is already selected (i.e. at least the diagram part in our case).

As a result, when we use Marquee Selection, we always get the selected parts + the diagram content part (Instead of just the selected parts, or the diagram content parts if nothing is touched by the marquee selection area)

To reproduce:

Expected behavior: