[mapguide-commits] r8171 - trunk/MgDev/Common/PlatformBase/MapLayer

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue May 27 00:43:52 PDT 2014


Author: jng
Date: 2014-05-27 00:43:52 -0700 (Tue, 27 May 2014)
New Revision: 8171

Modified:
   trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.cpp
   trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.h
Log:
#1267: Don't change layer name when calling SetLayerDefinition(). Also include a note in the API documentation about this new behaviour.

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.cpp	2014-05-27 06:10:21 UTC (rev 8170)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.cpp	2014-05-27 07:43:52 UTC (rev 8171)
@@ -297,7 +297,6 @@
         return;
 
     m_definition = SAFE_ADDREF((MgResourceIdentifier*)layerDefinition);
-    m_name = m_definition->GetName();
 
     m_forceReadFromServer = true;
     GetLayerInfoFromDefinition(resourceService);

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.h
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.h	2014-05-27 06:10:21 UTC (rev 8170)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/LayerBase.h	2014-05-27 07:43:52 UTC (rev 8171)
@@ -468,6 +468,10 @@
     /// ResourceId of the altered layer definition in the session
     /// repository.
     ///
+    /// From 2.7 onwards, this method will no longer modify the layer name. Previous
+    /// versions will set the layer's name based on the name of the Layer Definition
+    /// resource ID
+    ///
     /// \note
     /// If you change the layer's definition, you must also
     /// change the cached scale ranges and force an update of any



More information about the mapguide-commits mailing list