Use existing method for finding component with ID
This commit is contained in:
parent
82b9ab89c7
commit
8f3fe0e44a
@ -148,12 +148,7 @@ class FlightDataBranchHandler extends AbstractElementHandler {
|
||||
Rocket rocket = context.getOpenRocketDocument().getRocket();
|
||||
sourceID = attributes.get("source");
|
||||
if (sourceID != null) {
|
||||
for (RocketComponent child : rocket.getAllChildren()) {
|
||||
if (child.getID().equals(sourceID)) {
|
||||
source = child;
|
||||
break;
|
||||
}
|
||||
}
|
||||
source = rocket.findComponent(sourceID);
|
||||
}
|
||||
|
||||
branch.addEvent(new FlightEvent(type, time, source));
|
||||
|
Loading…
x
Reference in New Issue
Block a user