-
Bug
-
Resolution: Fixed
-
P4
-
7u6
-
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.
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.
- relates to
-
JDK-8115251 Selected ToggleButton under ToggleGroup is wrong
-
- Resolved
-