From b471a0cee98546395431c495b2179cd070ec6ff0 Mon Sep 17 00:00:00 2001 From: "andrey.zaytsev" Date: Thu, 4 Apr 2013 15:12:09 +0400 Subject: [PATCH] condition checkbox can't be unckecked --- .../BreakpointPropertiesPanel.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java index c6acaa59212e..71492c9aaf0c 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/BreakpointPropertiesPanel.java @@ -367,13 +367,26 @@ public abstract class BreakpointPropertiesPanel { } }; - ButtonGroup checkboxesGroup = new ButtonGroup(); - checkboxesGroup.add(myPassCountCheckbox); - checkboxesGroup.add(myConditionCheckbox); - myPassCountCheckbox.addActionListener(updateListener); + myPassCountCheckbox.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent event) { + if (myPassCountCheckbox.isSelected()) { + myConditionCheckbox.setSelected(false); + } + updateCheckboxes(); + } + }); myInstanceFiltersCheckBox.addActionListener(updateListener); myClassFiltersCheckBox.addActionListener(updateListener); - myConditionCheckbox.addActionListener(updateListener); + myConditionCheckbox.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent event) { + if (myConditionCheckbox.isSelected()) { + myPassCountCheckbox.setSelected(false); + } + updateCheckboxes(); + } + }); DebuggerUIUtil.focusEditorOnCheck(myPassCountCheckbox, myPassCountField); DebuggerUIUtil.focusEditorOnCheck(myLogExpressionCheckBox, myLogExpressionCombo); DebuggerUIUtil.focusEditorOnCheck(myInstanceFiltersCheckBox, myInstanceFiltersField.getTextField());