From 7daab1afa39f0a7768405dde75f8dcf6fe15e4a1 Mon Sep 17 00:00:00 2001 From: Roger Ferrel Date: Fri, 12 Sep 2014 14:45:25 -0500 Subject: [PATCH] Issue #3516 ColorMapTree change listener now only gets colormaps changes. Change-Id: Id19d0c0e958ec64a19abc064817780d067add023 Former-commit-id: 76011cb3ebb77389c93ad275d5c163f0a923bf1b [formerly fa91c4ac44dc9113522f03703532037f68c4a189] [formerly 28347129a1e2dd9147c3aa3574ac923dd616f7c8 [formerly bb265611d13e6cb9812aca3966d9fe2a20990a36]] Former-commit-id: 28347129a1e2dd9147c3aa3574ac923dd616f7c8 Former-commit-id: 7b052e61ca4ffab43fcf4281134ec417f6477aa3 --- .../src/com/raytheon/viz/ui/colormap/ColorMapTree.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/colormap/ColorMapTree.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/colormap/ColorMapTree.java index f703343a51..240b4f2682 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/colormap/ColorMapTree.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/colormap/ColorMapTree.java @@ -49,6 +49,7 @@ import com.raytheon.uf.viz.core.drawables.ColorMapLoader; * Sep 18, 2013 2421 bsteffen Initial creation * Sep 11, 2014 3516 rferrel file updates now inform the factory. * getName() no longer returns a null. + * FileChangeListener now only gets colormaps changes. * * * @@ -97,8 +98,11 @@ public class ColorMapTree { this.pathManager = pathManager; this.level = level; this.context = null; - LocalizationNotificationObserver.getInstance() - .addGlobalFileChangeObserver(new FileChangeListener(this)); + + LocalizationFile dir = pathManager.getLocalizationFile( + pathManager.getContext(LocalizationType.COMMON_STATIC, level), + path); + dir.addFileUpdatedObserver(new FileChangeListener(this)); } /** @@ -227,7 +231,7 @@ public class ColorMapTree { path)); } } - } else if (context.equals(context)) { + } else if (context.equals(this.context)) { synchronized (filesLock) { files = null; }