On Sat, 16 May 2026 12:42:44 GMT, Christopher Schnick <[email protected]> 
wrote:

>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/ComboBoxListViewSkin.java
>>  line 366:
>> 
>>> 364:             // exist in the ComboBox items list (part two of fix)
>>> 365:             if (index > -1) {
>>> 366:                 buttonCell.setItem(null);
>> 
>> Is this even needed? Because when we update the index anyway below, we are 
>> usually also setting the item?
>
> I am not sure, I just kept the original semantics. Maybe there was a reason 
> why it did it like this

I think we should consider removing it. The call to `updateIndex` below will 
lead to a `updateItem(int oldIndex)` call, which calls `updateItem(T item, 
boolean empty)`. And this will set the item as expected.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2169#discussion_r3252969747

Reply via email to