Changeset 9060


Ignore:
Timestamp:
Jun 1, 2009, 8:12:48 PM (15 years ago)
Author:
sdlime
Message:

Fixed whichShapes() to respect filters AND return all items. (#2689)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-5-4/mapserver/mapscript/swiginc/layer.i

    r8609 r9060  
    157157    int whichShapes(rectObj rect)
    158158    {
    159         /*
    160         ** We assume folks use this like a simple query so retrieve all items with each shape.
    161         */
    162         if(msLayerWhichItems(self, MS_TRUE, MS_FALSE, NULL) != MS_SUCCESS) return MS_FAILURE;
     159        int oldconnectiontype = self->connectiontype;
     160        self->connectiontype = MS_INLINE;
     161
     162        if(msLayerWhichItems(self, MS_TRUE, MS_FALSE, NULL) != MS_SUCCESS) {
     163            self->connectiontype = oldconnectiontype;
     164            return MS_FAILURE;
     165        }
     166        self->connectiontype = oldconnectiontype;
     167
    163168        return msLayerWhichShapes(self, rect);
    164     }   
     169    }
    165170
    166171    %newobject nextShape;
Note: See TracChangeset for help on using the changeset viewer.