Skip to content

Commit

Permalink
Fix: Adding a node to a graph container adds it to the graph instead
Browse files Browse the repository at this point in the history
When the constructors in the GraphNode class have been unified, we
wrongfully pass "graphModel.getGraph()" as an argument instead of the
current container. This causes all nodes to be added to the parent
graph.

See the UML example for reference. One of the class diagrams should be
contained by the UML container, but all three are part of the parent
graph instead.

Amends a13541f
  • Loading branch information
ptziegler authored and azoitl committed May 20, 2024
1 parent 8928041 commit f29e90d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ public GraphNode(IContainer graphModel, int style) {
}

public GraphNode(IContainer graphModel, int style, Object data) {
this(graphModel.getGraph(), style, "" /* text */, null /* image */, data);
this(graphModel, style, "" /* text */, null /* image */, data);
}

public GraphNode(IContainer graphModel, int style, String text) {
this(graphModel, style, text, null);
}

public GraphNode(IContainer graphModel, int style, String text, Object data) {
this(graphModel.getGraph(), style, text, null /* image */, data);
this(graphModel, style, text, null /* image */, data);
}

public GraphNode(IContainer graphModel, int style, String text, Image image) {
Expand Down

0 comments on commit f29e90d

Please sign in to comment.