Skip to content

Commit

Permalink
NetworkNodeCanvasVisualization: fix placement
Browse files Browse the repository at this point in the history
Order of operations was wrong: A space of half the supposed submodule
name label height was left above the icon, which is clearly against the
intention of the code.
  • Loading branch information
avarga committed Mar 27, 2024
1 parent 3fcc15f commit 7fb536e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ NetworkNodeCanvasVisualization::NetworkNodeCanvasVisualization(cModule *networkN
annotationFigure = new cPanelFigure("annotation");
addFigure(annotationFigure);
submoduleBounds = getEnvir()->getSubmoduleBounds(networkNode);
submoduleBounds.height += 32; // KLUDGE extend bounds for submodule name label
submoduleBounds.x = -submoduleBounds.width / 2;
submoduleBounds.y = -submoduleBounds.height / 2;
submoduleBounds.height += 32; // KLUDGE extend bounds for submodule name label
if (networkNode->hasPar("canvasImage") && strlen(networkNode->par("canvasImage")) != 0) {
imageFigure = new cImageFigure("node");
imageFigure->setTooltip("This image represents a network node");
Expand Down

0 comments on commit 7fb536e

Please sign in to comment.