support GPX 1.1 too
[potlatch2.git] / net / systemeD / potlatch2 / StyleSelector.mxml
index 9fa849e9457b10af4743ce535cb47492b78c85c3..71bcfed0ff7a4ba97fb723e8c782ec4e230fd50a 100644 (file)
@@ -6,8 +6,9 @@
        
        <mx:List width="100%" height="100%" id="mapStyle" 
                labelField="name"
-               change="Application.application.styleButton.close(); Application.application.setStylesheet(mapStyle.selectedItem.name, mapStyle.selectedItem.url);"
-               dataProvider="{Stylesheets.instance().getCollection()}" />
+               change="Application.application.styleButton.close(); Stylesheets.instance().setStylesheet(mapStyle.selectedItem.name, mapStyle.selectedItem.url);"
+               dataProvider="{Stylesheets.instance().getCollection()}"
+               updateComplete="{mapStyle.width=mapStyle.measureWidthOfItems()+2;mapStyle.height=mapStyle.measureHeightOfItems()+2}" />
 
        <mx:Button label="Edit..." click="new BackgroundDialog().init('Map style',mapStyle,Stylesheets.instance());" />