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

TreeCell: cell editing state not updated on cell re-use

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • jfx17
    • jfx16
    • javafx

    Description

      similar to pre-fix of JDK-8150525, the cell's editing property is not updated when updating its index, examples of failing tests:

          int editingIndex = 2;
          int cellIndex = 1;
           @Test
          public void testOffEditingIndex() {
              cell.updateIndex(editingIndex);
              TreeItem<String> editingItem = table.getTreeItem(editingIndex);
              table.edit(editingItem);
              cell.updateIndex(cellIndex);
              assertEquals("sanity: cell index changed", cellIndex, cell.getIndex());
              assertFalse("cell must not be editing on update from editingIndex" + editingIndex
                      + " to cellIndex " + cellIndex, cell.isEditing());
          }
         
          @Test
          public void testToEditingIndex() {
              cell.updateIndex(cellIndex);
              TreeItem<String> editingItem = table.getTreeItem(editingIndex);
              table.edit(editingItem);
              cell.updateIndex(editingIndex);
              assertEquals("sanity: cell at editing index", editingIndex, cell.getIndex());
              assertTrue("cell must be editing on update from " + cellIndex
                      + " to editingIndex " + editingIndex, cell.isEditing());
          }
          
      fix might be similar like that for TableCell (force updateEditing always) - doing so still leaves some unhandled transitions. Needs further digging.

      Attachments

        Issue Links

          Activity

            People

              fastegal Jeanette Winzenburg
              fastegal Jeanette Winzenburg
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: