]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/elements/TextGridNode.java
Preliminary implementation to update only changed profile entries
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / elements / TextGridNode.java
index 693862fcb86da454f791288eddd1f17acaebadbf..be0f23a590f62bb2a5009641a77d30b2847cd6ae 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
@@ -50,7 +50,7 @@ public class TextGridNode extends G2DParentNode implements Decoration {
 
     public static class A extends TextNode {
 
-       MonitorTextGridResult cache = null;
+        transient MonitorTextGridResult cache = null;
        
         private static final long serialVersionUID = -4519849713591842241L;
 
@@ -138,7 +138,7 @@ public class TextGridNode extends G2DParentNode implements Decoration {
         }
     }
 
-    private int computeRows() {
+    public int computeRows() {
         MaxY maxy = new MaxY();
         nodes.forEachKey(maxy);
         return maxy.max;
@@ -245,6 +245,7 @@ public class TextGridNode extends G2DParentNode implements Decoration {
     }
 
     public void removeRow(int y) {
+        rowIds.remove(y);
         List<Cell> row = peekRowCells(y);
         if (row.isEmpty())
             return;
@@ -290,7 +291,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) {