RFR: 8277122: SplitPane divider drag can hang the layout
Marius Hanl
mhanl at openjdk.java.net
Mon Nov 15 14:38:59 UTC 2021
When a divider is moved via drag or code it will call **requestLayout()** for the **SplitPane**.
While this is fine, it is also called when the **layoutChildren(..)** method is repositioning the divider.
This makes no sense since we are currently layouting everything, so we don't need to request it again (-> We are doing it right now).
After positioning the dividers the **SplitPane** content is layouted (based of the may new positioned dividers).
This PR fixes this by not requesting layout when we are currently doing it (and thus repositioning the dividers as part of it).
Note: I also fixed a simple typo of a private method in SplitPaneSkin:
initializeDivderEventHandlers -> initializeDiv**i**derEventHandlers
-------------
Commit messages:
- 8277122: SplitPane divider drag can hang the layout
Changes: https://git.openjdk.java.net/jfx/pull/669/files
Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=669&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8277122
Stats: 61 lines in 2 files changed: 54 ins; 1 del; 6 mod
Patch: https://git.openjdk.java.net/jfx/pull/669.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/669/head:pull/669
PR: https://git.openjdk.java.net/jfx/pull/669
More information about the openjfx-dev
mailing list