[mapserver-commits] r9227 - in branches/branch-5-4/mapserver: . mapscript/php3 mapscript/swiginc

svn at osgeo.org svn at osgeo.org
Sun Jul 26 07:10:35 EDT 2009


Author: tamas
Date: 2009-07-26 07:10:35 -0400 (Sun, 26 Jul 2009)
New Revision: 9227

Modified:
   branches/branch-5-4/mapserver/HISTORY.TXT
   branches/branch-5-4/mapserver/mapfile.c
   branches/branch-5-4/mapserver/mapscript/php3/mapscript_i.c
   branches/branch-5-4/mapserver/mapscript/swiginc/layer.i
Log:
Fixed the shape index for the inline layers (#3074)

Modified: branches/branch-5-4/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-4/mapserver/HISTORY.TXT	2009-07-26 11:06:58 UTC (rev 9226)
+++ branches/branch-5-4/mapserver/HISTORY.TXT	2009-07-26 11:10:35 UTC (rev 9227)
@@ -14,7 +14,9 @@
 Current Version:
 ----------------
 
+- Fixed the shape index for the inline layers (#3074)
 
+
 Version 5.4.2 (2009-07-23):
 ---------------------------
 

Modified: branches/branch-5-4/mapserver/mapfile.c
===================================================================
--- branches/branch-5-4/mapserver/mapfile.c	2009-07-26 11:06:58 UTC (rev 9226)
+++ branches/branch-5-4/mapserver/mapfile.c	2009-07-26 11:10:35 UTC (rev 9227)
@@ -675,8 +675,10 @@
       msSetError(MS_EOFERR, NULL, "loadFeature()");      
       return(MS_FAILURE);
     case(END):
-      if (player->features == NULL) shape->index = 0;
-      else shape->index = player->features->shape.index + 1;
+      if(player->features != NULL && player->features->tailifhead != NULL) 
+            shape->index = player->features->tailifhead->shape.index + 1;
+        else 
+            shape->index = 0;
       if((node = insertFeatureList(list, shape)) == NULL) 
 	status = MS_FAILURE;
 

Modified: branches/branch-5-4/mapserver/mapscript/php3/mapscript_i.c
===================================================================
--- branches/branch-5-4/mapserver/mapscript/php3/mapscript_i.c	2009-07-26 11:06:58 UTC (rev 9226)
+++ branches/branch-5-4/mapserver/mapscript/php3/mapscript_i.c	2009-07-26 11:10:35 UTC (rev 9227)
@@ -556,8 +556,10 @@
   }
 
 int layerObj_addFeature(layerObj *self, shapeObj *shape) {
-    if (self->features == NULL) shape->index = 0;
-    else shape->index = self->features->shape.index + 1;
+    if(self->features != NULL && self->features->tailifhead != NULL) 
+            shape->index = self->features->tailifhead->shape.index + 1;
+        else 
+            shape->index = 0;
     if(insertFeatureList(&(self->features), shape) == NULL) 
       return -1;
     else

Modified: branches/branch-5-4/mapserver/mapscript/swiginc/layer.i
===================================================================
--- branches/branch-5-4/mapserver/mapscript/swiginc/layer.i	2009-07-26 11:06:58 UTC (rev 9226)
+++ branches/branch-5-4/mapserver/mapscript/swiginc/layer.i	2009-07-26 11:10:35 UTC (rev 9227)
@@ -381,10 +381,12 @@
     int addFeature(shapeObj *shape) 
     {    
         self->connectiontype = MS_INLINE;
-        if (self->features == NULL) shape->index = 0;
-        else shape->index = self->features->shape.index + 1;
+        if(self->features != NULL && self->features->tailifhead != NULL) 
+            shape->index = self->features->tailifhead->shape.index + 1;
+        else 
+            shape->index = 0;
         if (insertFeatureList(&(self->features), shape) == NULL) 
-        return MS_FAILURE;
+            return MS_FAILURE;
         return MS_SUCCESS;
     }
 



More information about the mapserver-commits mailing list