[#2485] Fix motor mount not hiding
This commit is contained in:
parent
2f524016de
commit
7751faccda
@ -214,7 +214,10 @@ public abstract class RocketRenderer {
|
|||||||
if( null == motor ){
|
if( null == motor ){
|
||||||
throw new NullPointerException(" null motor from configuration.getActiveMotors... this is a bug.");
|
throw new NullPointerException(" null motor from configuration.getActiveMotors... this is a bug.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!((RocketComponent) mount).isVisible()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
double length = motor.getLength();
|
double length = motor.getLength();
|
||||||
|
|
||||||
Coordinate[] position = ((RocketComponent) mount).toAbsolute(new Coordinate(((RocketComponent) mount)
|
Coordinate[] position = ((RocketComponent) mount).toAbsolute(new Coordinate(((RocketComponent) mount)
|
||||||
|
@ -326,6 +326,10 @@ public class RocketFigure extends AbstractScaleFigure {
|
|||||||
double motorRadius = motor.getDiameter() / 2;
|
double motorRadius = motor.getDiameter() / 2;
|
||||||
RocketComponent mountComponent = ((RocketComponent) mount);
|
RocketComponent mountComponent = ((RocketComponent) mount);
|
||||||
|
|
||||||
|
if (!mountComponent.isVisible()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// <component>.getLocation() will return all the parent instances of this owning component, AND all of it's own instances as well.
|
// <component>.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...
|
// so, just draw a motor once for each Coordinate returned...
|
||||||
Coordinate[] mountLocations = mount.getLocations();
|
Coordinate[] mountLocations = mount.getLocations();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user