Integrated: 8263807: Button types of a DialogPane are set twice, returns a wrong button

Marius Hanl github.com+66004280+maran23 at openjdk.java.net
Thu Apr 8 15:19:10 UTC 2021


On Thu, 18 Mar 2021 14:38:18 GMT, Marius Hanl <github.com+66004280+Maran23 at openjdk.org> wrote:

> 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 and the 'buttonNodes' list will recreate the dialog button(s).
> Finally, this will make DialogPane#lookupButton returning the 'wrong' button, which is in fact not used inside the dialog button bar.

This pull request has now been integrated.

Changeset: 28475cb2
Author:    Marius Hanl <mariushanl at web.de>
Committer: Kevin Rushforth <kcr at openjdk.org>
URL:       https://git.openjdk.java.net/jfx/commit/28475cb2
Stats:     52 lines in 2 files changed: 45 ins; 3 del; 4 mod

8263807: Button types of a DialogPane are set twice, returns a wrong button

Reviewed-by: aghaisas, kcr

-------------

PR: https://git.openjdk.java.net/jfx/pull/432


More information about the openjfx-dev mailing list