Okay that didn't work...
This commit is contained in:
parent
1123a5d4ea
commit
ac663eb1c3
@ -282,9 +282,7 @@ public class RocketFigure extends AbstractScaleFigure {
|
||||
Color borderColor = ((SwingPreferences)Application.getPreferences()).getMotorBorderColor();
|
||||
|
||||
FlightConfiguration config = rocket.getSelectedConfiguration();
|
||||
Iterator<MotorConfiguration> itr = config.getActiveMotors().iterator();
|
||||
while (itr.hasNext()) {
|
||||
MotorConfiguration curInstance = itr.next();
|
||||
for (MotorConfiguration curInstance : config.getActiveMotors()) {
|
||||
MotorMount mount = curInstance.getMount();
|
||||
Motor motor = curInstance.getMotor();
|
||||
double motorLength = motor.getLength();
|
||||
@ -297,8 +295,8 @@ public class RocketFigure extends AbstractScaleFigure {
|
||||
|
||||
double mountLength = mountComponent.getLength();
|
||||
// System.err.println("Drawing Motor: "+motor.getDesignation()+" (x"+mountLocations.length+")");
|
||||
for ( Coordinate curMountLocation : mountLocations ){
|
||||
Coordinate curMotorLocation = curMountLocation.add( mountLength - motorLength + mount.getMotorOverhang(), 0, 0);
|
||||
for (Coordinate curMountLocation : mountLocations) {
|
||||
Coordinate curMotorLocation = curMountLocation.add(mountLength - motorLength + mount.getMotorOverhang(), 0, 0);
|
||||
// System.err.println(String.format(" mount instance: %s => %s", curMountLocation.toString(), curMotorLocation.toString() ));
|
||||
|
||||
// rotate by figure's axial rotation:
|
||||
@ -307,7 +305,7 @@ public class RocketFigure extends AbstractScaleFigure {
|
||||
{
|
||||
Shape s;
|
||||
if (currentViewType == RocketPanel.VIEW_TYPE.SideView) {
|
||||
s = new Rectangle2D.Double( curMotorLocation.x,
|
||||
s = new Rectangle2D.Double(curMotorLocation.x,
|
||||
(curMotorLocation.y - motorRadius),
|
||||
motorLength,
|
||||
2 * motorRadius);
|
||||
@ -381,9 +379,7 @@ public class RocketFigure extends AbstractScaleFigure {
|
||||
// allShapes is an output buffer -- it stores all the generated shapes
|
||||
allShapes.clear();
|
||||
|
||||
Iterator<Entry<RocketComponent, ArrayList<InstanceContext>>> itr = config.getActiveInstances().entrySet().iterator();
|
||||
while (itr.hasNext()) {
|
||||
Entry<RocketComponent, ArrayList<InstanceContext>> entry = itr.next();
|
||||
for (Entry<RocketComponent, ArrayList<InstanceContext>> entry : config.getActiveInstances().entrySet()) {
|
||||
final RocketComponent comp = entry.getKey();
|
||||
|
||||
// Only draw podsets when they are selected
|
||||
@ -402,9 +398,9 @@ public class RocketFigure extends AbstractScaleFigure {
|
||||
|
||||
final ArrayList<InstanceContext> contextList = entry.getValue();
|
||||
|
||||
for(InstanceContext context: contextList ) {
|
||||
for (InstanceContext context : contextList) {
|
||||
final Transformation currentTransform = this.axialRotation.applyTransformation(context.transform);
|
||||
allShapes = addThisShape( allShapes, this.currentViewType, comp, currentTransform);
|
||||
allShapes = addThisShape(allShapes, this.currentViewType, comp, currentTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user