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

Undo toggle selection does not work properly.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7u6
    • 7u6
    • javafx
    • None

      When two toggles belong to the same togglegroup, then selecting one will unselect the other.
      However, the transaction that performs this task is at this moment a simple setProperty.

      so if we have:

      TB1 (selected=false)
      TB2 (selected=false)

      and we set selected=true in TB1, we create a simple transaction that says: TB1.selected => true;
      then if we set selected=true in TB2, we create again a simple transaction that says: TB2.selected => true;
      Behind the scene, the toggle group will set TB1.selected=false - but the model has no track of that.

      Now if we undo the last transaction, then undo does: TB2.selected => false. However, there is nothing that
      will put TB1.selected => true - because the toggleGroup will do nothing behind the scene!

      So to really undo the switch TB2.selected => true we would need to register two actions, and not just one!

      We might need to to that in the inspector - exactly how is the question.

            dfuchs Daniel Fuchs
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: