Merge pull request #2049 from SiboVG/issue-2047
[#2047] Fix pod set & booster markers
This commit is contained in:
commit
98dccd868a
@ -181,10 +181,8 @@ public abstract class ComponentAssembly extends RocketComponent implements Axial
|
||||
public void updateBounds() {
|
||||
// currently only updates the length
|
||||
this.length = 0;
|
||||
Iterator<RocketComponent> childIterator = this.getChildren().iterator();
|
||||
while (childIterator.hasNext()) {
|
||||
RocketComponent curChild = childIterator.next();
|
||||
if(curChild.isAfter()){
|
||||
for (RocketComponent curChild : this.getChildren()) {
|
||||
if (curChild.isAfter()) {
|
||||
this.length += curChild.getLength();
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import net.sf.openrocket.rocketcomponent.ParallelStage;
|
||||
import net.sf.openrocket.rocketcomponent.PodSet;
|
||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||
import net.sf.openrocket.rocketcomponent.position.AxialMethod;
|
||||
import net.sf.openrocket.rocketcomponent.position.RadiusMethod;
|
||||
import net.sf.openrocket.util.Color;
|
||||
import net.sf.openrocket.util.Transformation;
|
||||
|
||||
@ -30,8 +31,10 @@ public class ComponentAssemblyShapes extends RocketComponentShape {
|
||||
}
|
||||
|
||||
// Correct the radius to be at the "reference point" dictated by the component's radius offset.
|
||||
double boundingRadius = assembly.getBoundingRadius();
|
||||
correctedTransform = correctedTransform.applyTransformation(new Transformation(0, -boundingRadius, 0));
|
||||
if (assembly.getRadiusMethod() == RadiusMethod.RELATIVE) {
|
||||
double boundingRadius = assembly.getBoundingRadius();
|
||||
correctedTransform = correctedTransform.applyTransformation(new Transformation(0, -boundingRadius, 0));
|
||||
}
|
||||
|
||||
double markerRadius = getDisplayRadius(component);
|
||||
Shape[] s = EmptyShapes.getShapesSideWithSelectionSquare(correctedTransform, markerRadius);
|
||||
@ -55,8 +58,11 @@ public class ComponentAssemblyShapes extends RocketComponentShape {
|
||||
ComponentAssembly assembly = (ComponentAssembly) component;
|
||||
|
||||
// Correct the radius to be at the "reference point" dictated by the component's radius offset.
|
||||
double boundingRadius = assembly.getBoundingRadius();
|
||||
Transformation correctedTransform = transformation.applyTransformation(new Transformation(0, -boundingRadius, 0));
|
||||
Transformation correctedTransform = transformation;
|
||||
if (assembly.getRadiusMethod() == RadiusMethod.RELATIVE) {
|
||||
double boundingRadius = assembly.getBoundingRadius();
|
||||
correctedTransform = correctedTransform.applyTransformation(new Transformation(0, -boundingRadius, 0));
|
||||
}
|
||||
|
||||
double markerRadius = getDisplayRadius(component);
|
||||
Shape[] s = EmptyShapes.getShapesBackWithSelectionSquare(correctedTransform, markerRadius);
|
||||
|
@ -0,0 +1,5 @@
|
||||
package net.sf.openrocket.gui.rocketfigure;
|
||||
|
||||
public class ParallelStageShapes extends ComponentAssemblyShapes {
|
||||
// Everything is handled by the ComponentAssemblyShapes class.
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package net.sf.openrocket.gui.rocketfigure;
|
||||
|
||||
public class PodSetShapes extends ComponentAssemblyShapes {
|
||||
// Everything is handled by the ComponentAssemblyShapes class.
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user