Skip to content
Snippets Groups Projects
Commit 53821d73 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

reaction glyph always contain reaction line (sometimes only empty line)

parent bd69ccf4
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!591Resolve "SBML Reaction glyphs missing curve segment result in NullPointer exception"
package lcsb.mapviewer.converter.model.sbml.reaction;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
......@@ -244,7 +245,13 @@ public class SbmlReactionExporter extends SbmlBioEntityExporter<Reaction, org.sb
assignStyleToGlyph(reactionGlyph, style);
}
if (reactionGlyph.getCurve().getCurveSegmentCount()==0) {
LineSegment segment = new LineSegment();
Point2D point = reaction.getReactants().get(0).getLine().getEndPoint();
segment.setStart(new Point(point.getX(), point.getY()));
segment.setEnd(new Point(point.getX(), point.getY()));
reactionGlyph.getCurve().addCurveSegment(segment);
}
}
private LocalStyle createStyleForModifier(Modifier modifier) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment