From ab28f00d0b29c833702e22a4198b300036e2a68b Mon Sep 17 00:00:00 2001 From: Wenjie Qiao Date: Fri, 25 Jan 2019 08:55:31 -0800 Subject: [PATCH] Common,B,JideToggleSplitButton,Fixed the SELECTED_KEY is not updated correctly when the selection state changed in JideToggleSplitButton,,no --- src/com/jidesoft/swing/JideToggleSplitButton.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/jidesoft/swing/JideToggleSplitButton.java b/src/com/jidesoft/swing/JideToggleSplitButton.java index a0701d700..422b881a0 100644 --- a/src/com/jidesoft/swing/JideToggleSplitButton.java +++ b/src/com/jidesoft/swing/JideToggleSplitButton.java @@ -118,9 +118,9 @@ protected void configurePropertiesFromAction(Action action) { if (selected != isSelected()) { // This won't notify ActionListeners, but that should be // ok as the change is coming from the Action. - setSelected(selected); + setButtonSelected(selected); // Make sure the change actually took effect - if (!selected && isSelected()) { + if (!selected && isButtonSelected()) { if (getModel() instanceof DefaultButtonModel) { ButtonGroup group = (ButtonGroup) ((DefaultButtonModel) getModel()).getGroup(); @@ -158,7 +158,7 @@ private void updateSelectedKey() { if (shouldUpdateSelectedStateFromAction()) { Action action = getAction(); if (action != null) { - boolean selected = isSelected(); + boolean selected = isButtonSelected(); Object existingKey = action.getValue(Action.SELECTED_KEY); if (existingKey == null || Boolean.TRUE.equals(existingKey) != selected) { action.putValue(Action.SELECTED_KEY, selected);