Fix overrideCG slider length for non-assembly components
This commit is contained in:
parent
3fcd942ee4
commit
d661cf12aa
@ -338,8 +338,8 @@ public class RocketComponentConfig extends JPanel {
|
|||||||
m = new DoubleModel(component, "OverrideCGX", UnitGroup.UNITS_LENGTH, 0);
|
m = new DoubleModel(component, "OverrideCGX", UnitGroup.UNITS_LENGTH, 0);
|
||||||
// Calculate suitable length for slider
|
// Calculate suitable length for slider
|
||||||
DoubleModel length;
|
DoubleModel length;
|
||||||
if (component instanceof ComponentAssembly) {
|
if (component.getChildCount() > 0) {
|
||||||
Iterator<RocketComponent> iterator = component.iterator(false);
|
Iterator<RocketComponent> iterator = component.iterator(true);
|
||||||
double minL = Double.MAX_VALUE;
|
double minL = Double.MAX_VALUE;
|
||||||
double maxL = Double.MIN_VALUE;
|
double maxL = Double.MIN_VALUE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user