]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Returning g2d back with original composite
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 20 Dec 2010 12:43:07 +0000 (12:43 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 20 Dec 2010 12:43:07 +0000 (12:43 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@19170 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/elements2/HoverShapeNode.java

index 9a84dbd943df2673f2cd65e1ca0ea778de38bcc1..f93a15de2692afbbabc2d8881af848f78376a8cc 100644 (file)
@@ -14,6 +14,7 @@ package org.simantics.sysdyn.ui.elements2;
 import java.awt.AlphaComposite;\r
 import java.awt.BasicStroke;\r
 import java.awt.Color;\r
+import java.awt.Composite;\r
 import java.awt.Graphics2D;\r
 import java.awt.Shape;\r
 import java.awt.Stroke;\r
@@ -36,6 +37,7 @@ public class HoverShapeNode extends ShapeNode implements ISelectionPainterNode {
         \r
         Color oldColor = g2d.getColor();\r
         BasicStroke oldStroke = (BasicStroke)g2d.getStroke();\r
+        Composite oldComposite = g2d.getComposite();\r
         \r
         boolean selected = NodeUtil.isSelected(this, 1);\r
         if (selected) {\r
@@ -57,6 +59,7 @@ public class HoverShapeNode extends ShapeNode implements ISelectionPainterNode {
 \r
         g2d.setColor(oldColor);\r
         g2d.setStroke(oldStroke);\r
+        g2d.setComposite(oldComposite);\r
         \r
         Stroke stroke = dynamicStroke != null ? dynamicStroke : this.stroke;\r
         if (stroke != null)\r