]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fixed event mask of org.simantics.diagram.elements.TextGridNode
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 28 Sep 2017 16:09:10 +0000 (19:09 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 28 Sep 2017 16:20:21 +0000 (19:20 +0300)
In order to function properly TextGridNode needs to listen to MouseMoved
and MouseButtonReleased events, which were missing from the event mask.

refs #7517

Change-Id: I301de9812ab9427a3ef037884c89b7cb4e7b0abe
(cherry picked from commit 7e1c0263ce7496c044e0de710b5db37a749df4f3)

bundles/org.simantics.diagram/src/org/simantics/diagram/elements/TextGridNode.java

index 693862fcb86da454f791288eddd1f17acaebadbf..f482890e9f762f724cf1373b56dfa09465e614ad 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2017 Association for Decentralized Information Management
  * in Industry THTH ry.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
@@ -290,7 +290,7 @@ public class TextGridNode extends G2DParentNode implements Decoration {
     
     @Override
     public int getEventMask() {
-        return EventTypes.MouseDragBeginMask | EventTypes.KeyPressedMask;
+        return EventTypes.MouseDragBeginMask | EventTypes.MouseMovedMask | EventTypes.MouseButtonReleasedMask | EventTypes.KeyPressedMask;
     }
     
     private static boolean isEventDummy(MouseDragBegin e) {