The alternative is to keep the two lists in sync; which would be a bit sad / 
difficult. I am also concerned about loading previously saved uDig project 
files.

1. Most code has already migrated to the IMap.getLayerList() method
2. It should be easy enough to do a traverse of the LegendItem tree and produce 
an answer for getLayerList() however ...
3. Jesse is correct that there may be some event listeners that are watching 
for context model to change its list of layers
4. I think we need to keep ContextModel around for one more release;  and 
switch the rendering code over to listen to getLegendItems() changing. This 
also gives us a chance to load previously created projects; and notice if the 
ContextModel is non empty (and use it to define the initial list of legend 
items)

-- 
Jody Garnett


On Wednesday, 8 February 2012 at 6:17 PM, Jesse Eichar wrote:

> Good luck.  I think events is going to be the trickiest part.
> 
> On Wed, Feb 8, 2012 at 8:53 AM, Paul Pfeiffer <[email protected] 
> (mailto:[email protected])> wrote:
> > As part of adding a legend view we have identified the possibility of 
> > removing the deprecated ContextModel from the Project Model. 
> > 
> > This would result in quite a few changes across the Project Model but at 
> > this stage all I have done (locally at this stage) is add a list of 
> > LegendItems to the Map. This legend (list of items) will replace the 
> > ContextModel which stores a list of layers for the map.
> > 
> > Give us a yell if you can think of any issues that might arise from 
> > removing ContextModel.
> > 
> > _______________________________________________
> > User-friendly Desktop Internet GIS (uDig)
> > http://udig.refractions.net
> > http://lists.refractions.net/mailman/listinfo/udig-devel
> > 
> 
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
> 
> 


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to