From 6434d6c3c6da7d9c34735fa7b321e26c99bbd117 Mon Sep 17 00:00:00 2001 From: lempinen Date: Mon, 20 Dec 2010 12:43:07 +0000 Subject: [PATCH] Returning g2d back with original composite git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@19170 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../src/org/simantics/sysdyn/ui/elements2/HoverShapeNode.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverShapeNode.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverShapeNode.java index 9a84dbd9..f93a15de 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverShapeNode.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverShapeNode.java @@ -14,6 +14,7 @@ package org.simantics.sysdyn.ui.elements2; import java.awt.AlphaComposite; import java.awt.BasicStroke; import java.awt.Color; +import java.awt.Composite; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.Stroke; @@ -36,6 +37,7 @@ public class HoverShapeNode extends ShapeNode implements ISelectionPainterNode { Color oldColor = g2d.getColor(); BasicStroke oldStroke = (BasicStroke)g2d.getStroke(); + Composite oldComposite = g2d.getComposite(); boolean selected = NodeUtil.isSelected(this, 1); if (selected) { @@ -57,6 +59,7 @@ public class HoverShapeNode extends ShapeNode implements ISelectionPainterNode { g2d.setColor(oldColor); g2d.setStroke(oldStroke); + g2d.setComposite(oldComposite); Stroke stroke = dynamicStroke != null ? dynamicStroke : this.stroke; if (stroke != null) -- 2.47.1