summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStas Negara <snegara@google.com>2015-06-04 17:11:06 -0700
committerStas Negara <snegara@google.com>2015-06-04 17:11:58 -0700
commit34a7a525fe19a15b807adc745903ef81ef6f4526 (patch)
tree0878bf50962d90b6501757c7b7f43fc8d606b0de
parent0f7953d6a06a89e905102eca60832569f4dff7fb (diff)
downloadtesting-34a7a525fe19a15b807adc745903ef81ef6f4526.tar.gz
Fix the problem with unchecking radio buttons.
Change-Id: I8fc8949cb63ac6072cf2ce1f2b45aa9a3b687d3a
-rw-r--r--src/com/google/gct/testing/TwoPanelTree.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/google/gct/testing/TwoPanelTree.java b/src/com/google/gct/testing/TwoPanelTree.java
index c2ac3e4..0ef3e1b 100644
--- a/src/com/google/gct/testing/TwoPanelTree.java
+++ b/src/com/google/gct/testing/TwoPanelTree.java
@@ -466,10 +466,11 @@ public class TwoPanelTree extends MouseAdapter implements ListSelectionListener,
TreeNode root = (TreeNode)currentTree.getModel().getRoot();
for (int i = 0; i < root.getChildCount(); i++) {
CheckedTreeNode firstLevelChild = (CheckedTreeNode)root.getChildAt(i);
- if (firstLevelChild.isChecked()) {
- return true;
- }
- if (!firstLevelChild.isLeaf()) {
+ if (firstLevelChild.isLeaf()) {
+ if (firstLevelChild.isChecked()) {
+ return true;
+ }
+ } else {
for (int j = 0; j < firstLevelChild.getChildCount(); j++) {
if (((CheckedTreeNode)firstLevelChild.getChildAt(j)).isChecked()) {
return true;