Added convenience function RocketComponent.getMotorMounts() returning List<MotorMount>.
This commit is contained in:
parent
7420f5c18b
commit
ba4ceccf26
@ -70,15 +70,7 @@ public class EditMotorConfigurationDialog extends JDialog {
|
|||||||
|
|
||||||
this.rocket = rocket;
|
this.rocket = rocket;
|
||||||
|
|
||||||
ArrayList<MotorMount> mountList = new ArrayList<MotorMount>();
|
mounts = rocket.getMotorMounts().toArray( new MotorMount[0]) ;
|
||||||
Iterator<RocketComponent> iterator = rocket.iterator();
|
|
||||||
while (iterator.hasNext()) {
|
|
||||||
RocketComponent c = iterator.next();
|
|
||||||
if (c instanceof MotorMount) {
|
|
||||||
mountList.add((MotorMount) c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mounts = mountList.toArray(new MotorMount[0]);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user