On Thu, 18 Dec 2025 08:25:37 GMT, Sergey Bylokhov <[email protected]> wrote:
> The fix in LWListPeer introduced by > [JDK-7125456](https://bugs.openjdk.org/browse/JDK-7125456) was intended to > suppress ItemEvents for programmatic changes to a List, while still allowing > events generated by user interaction. > > The implementation unconditionally bypasses the listener logic: > https://hg.openjdk.org/jdk7u/jdk7u-osx/jdk/rev/dfa991721457 > Unfortunately that logic also updates the cached selection state. As a > result, when the application select something programmatically, the cached > state is not updated. > > The change move out the `oldSelectedIndices = source.getSelectedIndices();` > from the `!isSkipStateChangedEvent()` condition, plus some cleanup. LGTM. I've also verified that CI testing looks good on all platforms. ------------- Marked as reviewed by azvegint (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/28890#pullrequestreview-3605316595
