Skip to content

Commit 6a64440

Browse files
author
brunomnsilva
committed
Fix: (of fix!) labels for vertices and edges are now updated during calls to
update() or updateAndWait().
1 parent e7d5f93 commit 6a64440

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

releases/JavaFXSmartGraph-0.9.jar

44 Bytes
Binary file not shown.

releases/JavaFXSmartGraph-0.9.zip

46 Bytes
Binary file not shown.

src/com/brunomnsilva/smartgraph/graphview/SmartGraphPanel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ private void updateLabels() {
679679
if (vertexNode != null) {
680680
SmartLabel label = vertexNode.getAttachedLabel();
681681
if(label != null) {
682-
label.setText(v.element().toString());
682+
label.setText(v.element() != null ? v.element().toString() : "<NULL>");
683683
}
684684

685685
}
@@ -690,7 +690,7 @@ private void updateLabels() {
690690
if (edgeNode != null) {
691691
SmartLabel label = edgeNode.getAttachedLabel();
692692
if (label != null) {
693-
label.setText(e.element().toString());
693+
label.setText(e.element() != null ? e.element().toString() : "<NULL>");
694694
}
695695
}
696696
});

0 commit comments

Comments
 (0)