]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/ElementPainter.java
Still working for multiple readers
[simantics/platform.git] / bundles / org.simantics.g2d / src / org / simantics / g2d / diagram / participant / ElementPainter.java
index d35bfadb04ba2fd7e92eefaaa4b5f7feda40440d..1f2bd210257aacb2779e6e7d002a2a43dccb362e 100644 (file)
@@ -140,7 +140,7 @@ public class ElementPainter extends AbstractDiagramParticipant implements Compos
                 final AffineTransform transform, final Rectangle2D bounds, final Color color);
     }
 
-    private static final boolean DEBUG                  = false;
+    private static final boolean DEBUG                  = true;
 
     public static final int      ELEMENT_PAINT_PRIORITY = 10;
 
@@ -1090,6 +1090,9 @@ public class ElementPainter extends AbstractDiagramParticipant implements Compos
         } else {
             SelectionNode s = selectionNode.getOrCreateNode(getNodeId("shape", e), SelectionNode.class);
             s.init(selectionTransform, bounds, color);
+            Double paddingFactor = diagram.getHint(DiagramHints.SELECTION_PADDING_SCALE_FACTOR);
+            if (paddingFactor != null)
+                s.setPaddingFactor(paddingFactor);
         }
     }