Fix for style switching. Might be better ways to do this with refactoring?
authorAndy Allan <gravitystorm@gmail.com>
Tue, 17 Aug 2010 09:53:37 +0000 (09:53 +0000)
committerAndy Allan <gravitystorm@gmail.com>
Tue, 17 Aug 2010 09:53:37 +0000 (09:53 +0000)
net/systemeD/halcyon/MapPaint.as

index 7d46a71..d386b1b 100644 (file)
@@ -184,12 +184,13 @@ package net.systemeD.halcyon {
         }
 
                public function redraw():void {
-                       for each (var w:WayUI in wayuis) { w.recalculate(); w.redraw(); }
-                       for each (var p:NodeUI in nodeuis) { p.redraw(); }
+                       for each (var w:WayUI in wayuis) { w.recalculate(); w.invalidateStyleList(); w.redraw(); }
+            /* sometimes (e.g. in Map.setStyle) Mappaint.redrawPOIs() is called immediately afterwards anyway. FIXME? */
+                       for each (var p:NodeUI in nodeuis) { p.invalidateStyleList(); p.redraw(); }
                }
 
                public function redrawPOIs():void {
-                       for each (var p:NodeUI in nodeuis) { p.redraw(); }
+                       for each (var p:NodeUI in nodeuis) { p.invalidateStyleList(); p.redraw(); }
                }
                
                public function findSource():VectorLayer {