Applies To: TreeLayerNamePanel.java

Call Sign: The Sunburned Surveyor
Date: 2006-10-09
Description: Commited the fix to the layerChanged() method.
This fix was contributed by Bob Littlefield. Larry Becker first
reported the problem that led to the discovery of the bug squished 
by this fix. He reported: 

"One of our users reported a problem that has been causing MrSID (or WMS layers) to "mysteriously" disappear.  Here is how to duplicate the problem:
1. Load up some layers so you have a good long list that extends off the bottom of the window.
2. Add a MrSID or WMS layer to the bottom of the list and make sure it is highlighted by turning if off.
   (Note: if you don't have a WMS layer that matches any of your layers, just use the default one, it doesn't matter.)
3. Now use the layer menu to add a new layer  (or perform any operation that adds a new layer).
4. Right click on the new layer and Remove Selected Layers.
5. Scroll down and your MrSID or WMS layer is gone too.

Note that you cannot duplicate this problem with only vector layers."

This bug was fixed by changing the Java statement:

"&& (getSelectedLayers().length == 0)"

with this statement:

"&& ((selectedNodes(Layerable.class)).size() == 0)"