Skip to content

Commit

Permalink
Common,B,JideToggleSplitButton,Fixed the SELECTED_KEY is not updated …
Browse files Browse the repository at this point in the history
…correctly when the selection state changed in JideToggleSplitButton,,no
  • Loading branch information
Wenjie Qiao committed Jan 24, 2019
1 parent 0f53190 commit cf414a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/jidesoft/swing/JideToggleSplitButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ public void itemStateChanged(ItemEvent e) {
private void updateSelectedKey() {
if (shouldUpdateSelectedStateFromAction()) {
Action action = getAction();
if (action != null && action.getValue(Action.SELECTED_KEY) != null) {
if (action != null) {
boolean selected = isSelected();
boolean isActionSelected = Boolean.TRUE.equals(action.getValue(Action.SELECTED_KEY));
if (isActionSelected != selected) {
Object existingKey = action.getValue(Action.SELECTED_KEY);
if (existingKey == null || Boolean.TRUE.equals(existingKey) != selected) {
action.putValue(Action.SELECTED_KEY, selected);
}
}
Expand Down

0 comments on commit cf414a5

Please sign in to comment.