Refactor again

This commit is contained in:
SiboVG 2023-01-18 00:20:01 +01:00
parent 3d02766d41
commit 08b9afb6ca
3 changed files with 10 additions and 10 deletions

View File

@ -1,5 +1,6 @@
package net.sf.openrocket.gui.rocketfigure;
import net.sf.openrocket.rocketcomponent.AxialStage;
import net.sf.openrocket.rocketcomponent.ParallelStage;
import net.sf.openrocket.rocketcomponent.PodSet;
import net.sf.openrocket.rocketcomponent.RocketComponent;
@ -11,6 +12,11 @@ import java.awt.Shape;
public class ComponentAssemblyShapes extends RocketComponentShape {
public static RocketComponentShape[] getShapesSide(final RocketComponent component, final Transformation transformation) {
// Ignore normal stages
if (component instanceof AxialStage && !(component instanceof ParallelStage)) {
return null;
}
double radius = getDisplayRadius(component);
Shape[] s = EmptyShapes.getShapesSideWithSelectionSquare(transformation, radius);
@ -26,6 +32,10 @@ public class ComponentAssemblyShapes extends RocketComponentShape {
}
public static RocketComponentShape[] getShapesBack(final RocketComponent component, final Transformation transformation) {
// Ignore normal stages
if (component instanceof AxialStage && !(component instanceof ParallelStage)) {
return null;
}
double radius = getDisplayRadius(component);
Shape[] s = EmptyShapes.getShapesBackWithSelectionSquare(transformation, radius);

View File

@ -1,5 +0,0 @@
package net.sf.openrocket.gui.rocketfigure;
public class ParallelStageShapes extends ComponentAssemblyShapes {
// Everything is implemented in ComponentAssemblyShapes.java
}

View File

@ -1,5 +0,0 @@
package net.sf.openrocket.gui.rocketfigure;
public class PodSetShapes extends ComponentAssemblyShapes {
// Everything is implemented in ComponentAssemblyShapes.java
}