Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Adding a node to a graph container adds it to the graph instead #447

Merged
merged 1 commit into from
May 20, 2024

Conversation

ptziegler
Copy link
Contributor

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

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
@ptziegler
Copy link
Contributor Author

In the UML example, we have the following code segment, which should create a new UML node and add it to the graph container.

Graph g = new Graph(shell, SWT.NONE);
g.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
GraphContainer c = new GraphContainer(g, SWT.NONE);
c.setText("A UML Container");
UMLNode n = new UMLNode(c, SWT.NONE, createClassFigure1(classFont, classImage, publicField, privateField));

However, this currently looks like this:

image

And with this fix, it looks like this:

image

@ptziegler
Copy link
Contributor Author

#443

@azoitl azoitl merged commit f29e90d into eclipse:master May 20, 2024
9 checks passed
@ptziegler ptziegler deleted the fix-graph-containers branch May 20, 2024 15:39
@ptziegler ptziegler added this to the 3.20.0 milestone May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants