RFR: 8263807: Button types of a DialogPane are set twice, returns a wrong button
Marius Hanl
github.com+66004280+maran23 at openjdk.java.net
Thu Mar 18 14:46:54 UTC 2021
When DialogPane#getButtonTypes().setAll() is called twice with the same argument(s), DialogPane#lookupButton does not return the node which is shown inside the button bar.
This is due DialogPane adding two list change listeners to 'buttons' (#getButtonTypes). They have the wrong order, which will result in the button bar not changing at all, but the 'buttonNodes' list will recreate the dialog button, which is not shown.
Finally, this will make DialogPane#lookupButton returning the 'wrong' button, which is in fact not used inside the dialog button bar.
-------------
Commit messages:
- Fix lookupButton does return wrong Node
Changes: https://git.openjdk.java.net/jfx/pull/432/files
Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=432&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8263807
Stats: 53 lines in 2 files changed: 45 ins; 3 del; 5 mod
Patch: https://git.openjdk.java.net/jfx/pull/432.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/432/head:pull/432
PR: https://git.openjdk.java.net/jfx/pull/432
More information about the openjfx-dev
mailing list