[mapserver-commits] r11766 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Sat May 28 11:15:46 EDT 2011


Author: tamas
Date: 2011-05-28 08:15:46 -0700 (Sat, 28 May 2011)
New Revision: 11766

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/classobject.c
Log:
Changed msRemoveStyle to allow removing all styles (#3895)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-05-28 10:34:19 UTC (rev 11765)
+++ trunk/mapserver/HISTORY.TXT	2011-05-28 15:15:46 UTC (rev 11766)
@@ -15,6 +15,8 @@
 Current Version (SVN trunk, 6.1-dev, future 6.2): 
 ------------------------------------------------- 
 
+- Changed msRemoveStyle to allow removing all styles (#3895)
+
 - Fixed mssql2008 to return correct geometries with chart layer type (#3894)
 
 - Ensure msLayerSetProcessingKey() supports setting a NULL value to clear

Modified: trunk/mapserver/classobject.c
===================================================================
--- trunk/mapserver/classobject.c	2011-05-28 10:34:19 UTC (rev 11765)
+++ trunk/mapserver/classobject.c	2011-05-28 15:15:46 UTC (rev 11766)
@@ -139,11 +139,7 @@
 styleObj *msRemoveStyle(classObj *class, int nStyleIndex) {
     int i;
     styleObj *style;
-    if (class->numstyles == 1) {
-        msSetError(MS_CHILDERR, "Cannot remove a class's sole style", "removeStyle()");
-        return NULL;
-    }
-    else if (nStyleIndex < 0 || nStyleIndex >= class->numstyles) {
+    if (nStyleIndex < 0 || nStyleIndex >= class->numstyles) {
         msSetError(MS_CHILDERR, "Cannot remove style, invalid nStyleIndex %d", "removeStyle()", nStyleIndex);
         return NULL;
     }



More information about the mapserver-commits mailing list