Merge commit '28314e7a9a3c3ebfcc4db8e9f1875507063ae6e6' into development
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / GUIManualSwitch.java
index 0993024..0342350 100644 (file)
@@ -30,7 +30,7 @@ public class GUIManualSwitch extends GUIComponent
                logicObs = (i) -> requestRedraw();
 
                setSize(width, height);
-               addPin(this.outputPin = new Pin(this, 1, width, height / 2));
+               addPin(this.outputPin = new Pin(this, "", 1, width, height / 2));
        }
 
        @Override
@@ -40,7 +40,7 @@ public class GUIManualSwitch extends GUIComponent
                double posY = getBounds().y;
 
                // TODO maybe draw switch state too?
-               gc.drawRectangle(posX, posY, width, height);
+               gc.drawRectangle(getBounds());
                String label = BitVectorFormatter.formatValueAsString(end);
                Font oldFont = gc.getFont();
                Font labelFont = new Font(oldFont.getName(), fontHeight, oldFont.getStyle());