diff --git a/swing/src/main/java/info/openrocket/swing/gui/figure3d/RocketRenderer.java b/swing/src/main/java/info/openrocket/swing/gui/figure3d/RocketRenderer.java index 8d24294ac..17524e7a6 100644 --- a/swing/src/main/java/info/openrocket/swing/gui/figure3d/RocketRenderer.java +++ b/swing/src/main/java/info/openrocket/swing/gui/figure3d/RocketRenderer.java @@ -214,7 +214,10 @@ public abstract class RocketRenderer { if( null == motor ){ throw new NullPointerException(" null motor from configuration.getActiveMotors... this is a bug."); } - + + if (!((RocketComponent) mount).isVisible()) { + continue; + } double length = motor.getLength(); Coordinate[] position = ((RocketComponent) mount).toAbsolute(new Coordinate(((RocketComponent) mount) diff --git a/swing/src/main/java/info/openrocket/swing/gui/scalefigure/RocketFigure.java b/swing/src/main/java/info/openrocket/swing/gui/scalefigure/RocketFigure.java index 62bfac6b9..cf58cbc97 100644 --- a/swing/src/main/java/info/openrocket/swing/gui/scalefigure/RocketFigure.java +++ b/swing/src/main/java/info/openrocket/swing/gui/scalefigure/RocketFigure.java @@ -326,6 +326,10 @@ public class RocketFigure extends AbstractScaleFigure { double motorRadius = motor.getDiameter() / 2; RocketComponent mountComponent = ((RocketComponent) mount); + if (!mountComponent.isVisible()) { + continue; + } + // .getLocation() will return all the parent instances of this owning component, AND all of it's own instances as well. // so, just draw a motor once for each Coordinate returned... Coordinate[] mountLocations = mount.getLocations();