fix vector background dialogue to cope with changed stylesheets object
authorRichard Fairhurst <richard@systemed.net>
Mon, 22 Nov 2010 15:19:31 +0000 (15:19 +0000)
committerRichard Fairhurst <richard@systemed.net>
Mon, 22 Nov 2010 15:19:31 +0000 (15:19 +0000)
net/systemeD/potlatch2/VectorSourceDialog.mxml

index 732d7dc..ef00a4e 100644 (file)
@@ -24,8 +24,9 @@
                                        <mx:Component>
                                        <mx:ComboBox
                                                        selectedItem="{outerDocument.whichStyle(data)}"
-                                               change="outerDocument.styleEdited(data.name,selectedItem.data)"
-                                               dataProvider="{outerDocument.styles}" />
+                                               change="outerDocument.styleEdited(data.name,selectedItem.url)"
+                                               dataProvider="{outerDocument.styles}" 
+                                                       labelField="name" />
                                        </mx:Component>
                                </mx:itemRenderer>
                        </mx:DataGridColumn>
@@ -86,7 +87,7 @@
 
        public function whichStyle(item:Object):Object {
                for each (var style:Object in styles) {
-                       if (style.data==item.style) { return style; }
+                       if (style.url==item.style) { return style; }
                }
                return {};
        }