From 1c768629ea3b3e7be07cca681c29deb3210f05f8 Mon Sep 17 00:00:00 2001 From: JoePfeiffer Date: Wed, 15 Sep 2021 10:55:12 -0600 Subject: [PATCH] Search for motors by designation or common name, for backward compatibility with 15.03 --- .../database/motor/ThrustCurveMotorSetDatabase.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSetDatabase.java b/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSetDatabase.java index d04aea975..60b3256b4 100644 --- a/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSetDatabase.java +++ b/core/src/net/sf/openrocket/database/motor/ThrustCurveMotorSetDatabase.java @@ -44,7 +44,9 @@ public class ThrustCurveMotorSetDatabase implements MotorDatabase { matchDescription = false; else if (manufacturer != null && !m.getManufacturer().matches(manufacturer)) matchDescription = false; - else if (designation != null && !designation.equalsIgnoreCase(m.getDesignation())) + else if (designation != null && + !designation.equalsIgnoreCase(m.getDesignation()) && + !designation.equalsIgnoreCase(m.getCommonName())) matchDescription = false; else if (!Double.isNaN(diameter) && (Math.abs(diameter - m.getDiameter()) > 0.005)) matchDescription = false;