diff --git a/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSetDatabase.java b/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSetDatabase.java index 60b3256b4..6ff4b4ab5 100644 --- a/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSetDatabase.java +++ b/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSetDatabase.java @@ -34,7 +34,7 @@ public class ThrustCurveMotorSetDatabase implements MotorDatabase { for (ThrustCurveMotor m : set.getMotors()) { boolean matchDescription = true; boolean matchDigest = true; - + // unlike the description, digest must be present in search criteria to get a match if (digest == null || digest != m.getDigest()) matchDigest = false; @@ -45,8 +45,8 @@ public class ThrustCurveMotorSetDatabase implements MotorDatabase { else if (manufacturer != null && !m.getManufacturer().matches(manufacturer)) matchDescription = false; else if (designation != null && - !designation.equalsIgnoreCase(m.getDesignation()) && - !designation.equalsIgnoreCase(m.getCommonName())) + !m.getDesignation().toUpperCase().contains(designation.toUpperCase()) && + !designation.toUpperCase().contains(m.getCommonName().toUpperCase())) matchDescription = false; else if (!Double.isNaN(diameter) && (Math.abs(diameter - m.getDiameter()) > 0.005)) matchDescription = false; diff --git a/core/src/net/sf/openrocket/file/openrocket/importt/MotorHandler.java b/core/src/net/sf/openrocket/file/openrocket/importt/MotorHandler.java index e11247c3e..5e4258cb3 100644 --- a/core/src/net/sf/openrocket/file/openrocket/importt/MotorHandler.java +++ b/core/src/net/sf/openrocket/file/openrocket/importt/MotorHandler.java @@ -1,5 +1,7 @@ package net.sf.openrocket.file.openrocket.importt; +import java.lang.Double; + import java.util.HashMap; import java.util.Locale; @@ -42,7 +44,7 @@ class MotorHandler extends AbstractElementHandler { * Return the motor to use, or null. */ public Motor getMotor(WarningSet warnings) { - return context.getMotorFinder().findMotor(type, manufacturer, designation, diameter, length, digest, warnings); + return context.getMotorFinder().findMotor(type, manufacturer, designation, Double.NaN, Double.NaN, digest, warnings); } /** @@ -142,4 +144,4 @@ class MotorHandler extends AbstractElementHandler { } } -} \ No newline at end of file +}