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

getBorder returns null when border should be empty

parent cf96753c
No related branches found
No related tags found
3 merge requests!716Merge 12.2.0,!715merge 12.2.0,!689Resolve "Overlapping compartments in non-layout SBML upload"
......@@ -322,7 +322,7 @@ public abstract class Element implements BioEntity, Serializable, SbmlArgument {
* @see x
*/
public void setX(String string) {
this.x = Double.parseDouble(string);
setX(Double.parseDouble(string));
}
/**
......@@ -483,7 +483,7 @@ public abstract class Element implements BioEntity, Serializable, SbmlArgument {
* @return rectangle border
*/
public Rectangle2D getBorder() {
if (x == null || y == null || width == null || height == null) {
if (x == null || y == null || width == null || height == null || width == 0.0 || height == 0.0) {
return null;
}
return new Rectangle2D.Double(x, y, width, height);
......
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