Merge commit '42b2e5ca519766e37ce6941ba4faecc9691cc403' into upstream
[debian/openrocket] / core / src / net / sf / openrocket / gui / dialogs / EditMotorConfigurationDialog.java
index 0a41ce66546fa079efaac3223ba6b30d15baf01e..6735e0d3a45d2ba17a791bc48dc526ce22bedb03 100644 (file)
@@ -70,15 +70,7 @@ public class EditMotorConfigurationDialog extends JDialog {
                
                this.rocket = rocket;
                
-               ArrayList<MotorMount> mountList = new ArrayList<MotorMount>();
-               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]);
+               mounts = rocket.getMotorMounts().toArray( new MotorMount[0]) ;