Skip to content
Snippets Groups Projects
Commit 7d181251 authored by Tobias Ullerich's avatar Tobias Ullerich
Browse files

Fix pseudo class styles of graphics in pad view

parent 7ce89336
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ package de.tobias.playpad.util; ...@@ -2,6 +2,7 @@ package de.tobias.playpad.util;
import javafx.scene.Node; import javafx.scene.Node;
import javafx.scene.Parent; import javafx.scene.Parent;
import javafx.scene.control.Labeled;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -21,6 +22,14 @@ public class NodeWalker { ...@@ -21,6 +22,14 @@ public class NodeWalker {
private static void addAllDescendents(Parent parent, List<Node> nodes) { private static void addAllDescendents(Parent parent, List<Node> nodes) {
for (Node node : parent.getChildrenUnmodifiable()) { for (Node node : parent.getChildrenUnmodifiable()) {
nodes.add(node); nodes.add(node);
if (node instanceof Labeled) {
final Node graphic = ((Labeled) node).getGraphic();
if (graphic != null) {
nodes.add(graphic);
}
}
if (node instanceof Parent) if (node instanceof Parent)
addAllDescendents((Parent) node, nodes); addAllDescendents((Parent) node, nodes);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment