Ticket #96 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

LayerNode and Legend don't update when layer changes name

Reported by: bartvde Assigned to:
Priority: major Milestone: 0.5
Component: GeoExt.LegendPanel Version: SVN
Keywords: Cc:
State: Commit

Description

Currently the LayerNode text and the LegendPanel title don't update when the layer's name changes value. OpenLayers does send the changelayer event with property name, and the LayerStore sends out an update event. But the LayerNode and LegendPanel don't update their values.

This is for instance a use case in our catalogue application, when adding the layer we do not know the title, we only know if after parsing the GetCapabilities, so the title comes in late and we want to update it.

Attachments

ticket96.patch (10.1 kB) - added by bartvde on 06/17/09 16:38:06.
patch containing tests
ticket96.2.patch (5.9 kB) - added by bartvde on 06/17/09 16:39:34.
patch containing tests
ticket96.3.patch (7.6 kB) - added by bartvde on 06/18/09 20:34:30.
new patch implementing Andreas' comments
geoext-96.patch (8.4 kB) - added by ahocevar on 06/19/09 16:17:18.
fixed tests in IE, some coding style improvements

Change History

06/17/09 16:38:06 changed by bartvde

  • attachment ticket96.patch added.

patch containing tests

06/17/09 16:39:34 changed by bartvde

  • attachment ticket96.2.patch added.

patch containing tests

06/17/09 16:41:08 changed by bartvde

  • state changed from None to Review.

06/18/09 11:13:16 changed by ahocevar

  • state changed from Review to Needs more work.
  • milestone changed from 0.6 to 0.5.

Bart: since layer nodes can also live without a container, layer nodes have to listen for the changelayer event (instead of the container). Let me know if you have time to make this change, otherwise I will try to do it. Either way, I would like to have this in 0.5.

06/18/09 20:34:30 changed by bartvde

  • attachment ticket96.3.patch added.

new patch implementing Andreas' comments

06/18/09 20:35:58 changed by bartvde

  • state changed from Needs more work to Review.

Hi Andreas, I've changed the patch. Btw one of the layernodes tests was failing for me before this change so I've also patched that one in my patch (the change is in the destroy function of LayerNode).

Btw, still having issues with whitespace formatting when using svn diff, not sure why.

06/19/09 16:17:18 changed by ahocevar

  • attachment geoext-96.patch added.

fixed tests in IE, some coding style improvements

06/19/09 16:19:44 changed by ahocevar

  • state changed from Review to Commit.

Bart: I only made a few changes: tests in IE failed because due to the map panel not being rendered yet, the layerstore cannot be guessed. Fixed that, and while at it also checked for proper layerStore before destroying (instead it was not guessed yet). Also made some minor coding style improvements (especially items.get(n) instead of items.items[n]).

Tests now pass in FF3 and IE7. Please commit.

06/19/09 16:35:06 changed by bartvde

  • status changed from new to closed.
  • resolution set to fixed.

(In [1115]) make sure legend and layer nodes update when layer name is changed r=ahovecar (closes #96)

06/22/09 09:47:12 changed by ahocevar

(In [1118]) Now that we have assigned layerStore, use it instead of this.layerStore. Non-functional change (see #96)