From 03d84519866658cb72caaae6d8fc2e2e7d8c815c Mon Sep 17 00:00:00 2001
From: Lukas Ladenberger <lukas.ladenberger@googlemail.com>
Date: Wed, 7 Nov 2012 17:47:35 +0100
Subject: [PATCH] assigned external script observer to railway controls

---
 de.bmotionstudio.gef.editor/plugin.xml                   | 9 +++++++++
 .../de/bmotionstudio/gef/editor/figure/SwitchFigure.java | 3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/de.bmotionstudio.gef.editor/plugin.xml b/de.bmotionstudio.gef.editor/plugin.xml
index cea3db29..f1d465af 100644
--- a/de.bmotionstudio.gef.editor/plugin.xml
+++ b/de.bmotionstudio.gef.editor/plugin.xml
@@ -625,6 +625,15 @@
             </control>    
             <control
                   id="de.bmotionstudio.gef.editor.signal">
+            </control>
+            <control
+                  id="de.bmotionstudio.gef.editor.switch">
+            </control>
+            <control
+                  id="de.bmotionstudio.gef.editor.track">
+            </control>
+            <control
+                  id="de.bmotionstudio.gef.editor.tracknode">
             </control>                            
          </observer>
          <observer
diff --git a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/SwitchFigure.java b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/SwitchFigure.java
index 64342016..3e2436ac 100644
--- a/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/SwitchFigure.java
+++ b/de.bmotionstudio.gef.editor/src/de/bmotionstudio/gef/editor/figure/SwitchFigure.java
@@ -14,7 +14,6 @@ import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.RGB;
 import org.eclipse.swt.widgets.Display;
 
-
 public class SwitchFigure extends AbstractBMotionFigure {
 
 	Color borderColor = new Color(Display.getDefault(), new RGB(235, 235, 235));
@@ -27,6 +26,8 @@ public class SwitchFigure extends AbstractBMotionFigure {
 	@Override
 	protected void paintBorder(Graphics g) {
 		Rectangle r = getClientArea();
+		if (!this.visible && !isRunning())
+			g.setAlpha(255);
 		g.setForegroundColor(borderColor);
 		g.setLineStyle(SWT.LINE_DASH);
 		r.height += -1;
-- 
GitLab