Mercurial > hg > release > thermostat-1.0
changeset 415:17313a694032
Reset filters when synchronizing *tree*
review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-June/001966.html
reviewed-by: rkennked
author | Mario Torre <neugens.limasoftware@gmail.com> |
---|---|
date | Thu, 21 Jun 2012 17:50:09 +0200 |
parents | 79c07f5c005a |
children | 6cef11203d8f |
files | client/core/src/main/java/com/redhat/thermostat/client/ui/MainWindow.java |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/client/core/src/main/java/com/redhat/thermostat/client/ui/MainWindow.java Thu Jun 21 17:41:40 2012 +0200 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ui/MainWindow.java Thu Jun 21 17:50:09 2012 +0200 @@ -185,6 +185,7 @@ subTreeMatches = true; } } + return subTreeMatches; } @@ -215,8 +216,8 @@ @SuppressWarnings("unchecked") // We know what we put into these trees. List<DefaultMutableTreeNode> sourceChildren = Collections.list(sourceRoot.children()); + @SuppressWarnings("unchecked") - List<DefaultMutableTreeNode> targetChildren = Collections.list(targetNode.children()); for (DefaultMutableTreeNode sourceChild : sourceChildren) { Ref sourceRef = (Ref) sourceChild.getUserObject(); @@ -225,6 +226,10 @@ Ref targetRef = (Ref) aChild.getUserObject(); if (targetRef.equals(sourceRef)) { targetChild = aChild; + if (sourceChild instanceof DecoratedDefaultMutableTreeNode) { + DecoratedDefaultMutableTreeNode source = (DecoratedDefaultMutableTreeNode) sourceChild; + ((DecoratedDefaultMutableTreeNode) targetChild).setDecorators(source.getDecorators()); + } break; } }