ADD support for "sourcekey" entity in imagery.xml and controller/ControllerState.as.
authorSteve Bennett <stevagewp@gmail.com>
Sun, 23 Jan 2011 09:33:23 +0000 (09:33 +0000)
committerSteve Bennett <stevagewp@gmail.com>
Sun, 23 Jan 2011 09:33:23 +0000 (09:33 +0000)
http://trac.openstreetmap.org/ticket/3472

net/systemeD/potlatch2/controller/ControllerState.as
resources/imagery.xml

index dec3388..3f9cb31 100644 (file)
@@ -188,7 +188,10 @@ package net.systemeD.potlatch2.controller {
                protected function setSourceTag():void {
                        if (selectCount!=1) { return; }
                        if (Imagery.instance().selected && Imagery.instance().selected.sourcetag) {
-                               firstSelected.setTag('source',Imagery.instance().selected.sourcetag, MainUndoStack.getGlobalStack().addAction);
+                               if ("sourcekey" in Imagery.instance().selected)
+                                   firstSelected.setTag(Imagery.instance().selected.sourcekey,Imagery.instance().selected.sourcetag, MainUndoStack.getGlobalStack().addAction);
+                               else
+                                   firstSelected.setTag('source',Imagery.instance().selected.sourcetag, MainUndoStack.getGlobalStack().addAction);
                        }
                        controller.updateSelectionUI();
                }
index 6164f7e..fb84b52 100644 (file)
@@ -37,6 +37,7 @@
                <name>OS OpenData Locator</name>
                <url>http://tiles.itoworld.com/os_locator/$z/$x/$y.png</url>
                <sourcetag>OS OpenData Locator</sourcetag>
+               <sourcekey>source:name</sourcekey>
        </set>
        <set minlat="49.8" minlon="-9" maxlat="61.1" maxlon="1.9">
                <name>OS 1:25k historic</name>