Skip to content

Commit

Permalink
fixed a bug that clicking on the validation result icon will clear al…
Browse files Browse the repository at this point in the history
…l other decorations on the same target node
  • Loading branch information
jidesoft committed Dec 5, 2013
1 parent 0ff7b65 commit b69ea26
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -511,17 +511,17 @@ public void handle(ValidationEvent event) {
else {
label = new Label("", graphic);
TooltipEx.install(label, tooltip);
resultDecorator = createDefaultDecorator(targetNode, label);
label.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
DecorationUtils.uninstall(targetNode);
DecorationUtils.uninstall(targetNode, resultDecorator);
resultDecorator = null;
targetNode.getProperties().remove(PROPERTY_VALIDATION_RESULT);
targetNode.getParent().requestLayout();
event.consume();
}
});
resultDecorator = createDefaultDecorator(targetNode, label);
DecorationUtils.install(targetNode, resultDecorator);
targetNode.getParent().requestLayout();
}
Expand Down

0 comments on commit b69ea26

Please sign in to comment.