Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8095636

ListView selectedItems(): wrong notification on SHIFT-Select

XMLWordPrintable

      Hi, I was just making sure that bug https://javafx-jira.kenai.com/browse/RT-32411 that I reported months ago was fixed on the current jdk8-fcs-b127, and I can happily report that it is.
      But I've found a new case in which it doesn't do the right thing, here how to reproduce:
      1) Take the same code as in https://javafx-jira.kenai.com/browse/RT-32411
      2) Select a number, like 2, you'll get:

      Added: 2
      In list currently: 2

      That's correct.
      3) Now press down SHIFT and select 4 (to range-select), you'll get:

      Added: 2
      Added: 3
      In list currently: 2
      In list currently: 3
      In list currently: 4

      So the content of the change list is correct, 2, 3 and 4, but the getAddedSubList() seems to be off by one: it reports addition of only 2 and 3, 4 is missing, and 2 was already present; it should just contain 3, 4.

      But if you do it "upwards" it works, ie. select 4 and then shift-select 2:

      Added: 4
      In list currently: 4
      Added: 2
      Added: 3
      In list currently: 2
      In list currently: 3
      In list currently: 4

      Hope this helps in narrowing down the bug and thanks for your efforts, Luca.

            jgiles Jonathan Giles
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: