Issue #1575 apply persisted colormap attributes to grid resources

Former-commit-id: f8b9b2c987 [formerly 07d053bb3c] [formerly 1884c77278 [formerly 4bb77ee1763890a355a0ac5eefb8c14c12e13780]]
Former-commit-id: 1884c77278
Former-commit-id: a2a95a17aa
This commit is contained in:
Ben Steffensmeier 2013-02-01 12:45:39 -06:00
parent c5dce3cc06
commit 16be5e1ab5

View file

@ -51,6 +51,7 @@ import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.drawables.ColorMapLoader;
import com.raytheon.uf.viz.core.drawables.ColorMapParameters;
import com.raytheon.uf.viz.core.drawables.ColorMapParameters.PersistedParameters;
import com.raytheon.uf.viz.core.drawables.IRenderable;
import com.raytheon.uf.viz.core.drawables.PaintProperties;
import com.raytheon.uf.viz.core.exception.VizException;
@ -595,6 +596,13 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
// reuse the old parameters. This is useful when the resource is
// sharing capabilities, for example in an FFGVizGroupResource.
newParameters = oldParameters;
} else if (oldParameters != null) {
newParameters.setColorMapName(oldParameters.getColorMapName());
newParameters.setColorMap(oldParameters.getColorMap());
PersistedParameters persisted = oldParameters.getPersisted();
if (persisted != null) {
newParameters.applyPersistedParameters(persisted);
}
}
return newParameters;
}