Commit 0e438f45 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

check null only once

parent 90a6033a
......@@ -449,13 +449,10 @@ public class SbmlSpeciesParser extends SbmlElementParser<org.sbml.jsbml.Species>
if (element.getNameY() == null) {
element.setNameY(element.getY());
}
if (element.getNameWidth() == null) {
if (element.getNameWidth() == null || element.getNameHeight() == null) {
element.setNameWidth(element.getWidth() - (element.getNameX() - element.getX()));
element.setNameHeight(element.getHeight() - (element.getNameY() - element.getY()));
}
if (element.getNameX() == null) {
element.setNameX(element.getX());
}
if (element.getNameHorizontalAlign() == null) {
element.setNameHorizontalAlign(HorizontalAlign.CENTER);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment