From 22c4cce5bdd97c96c0e11d261d27863aed940741 Mon Sep 17 00:00:00 2001 From: jobi Date: Sun, 4 Apr 2004 15:27:33 +0000 Subject: [PATCH] ** fixed GRASS provider git-svn-id: http://svn.osgeo.org/qgis/trunk@1149 c8812cc2-4d05-0410-92ff-de0c093fc19c --- ChangeLog | 5 ++++- configure.in | 4 ++-- providers/grass/qgsgrassprovider.cpp | 6 +++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e8f1eb01897..eb54887f221 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,11 @@ QGIS Change Log -ChangeLog,v 1.52 2004/04/03 11:05:34 timlinux Exp +ChangeLog,v 1.53 2004/04/04 15:27:33 jobi Exp ------------------------------------------------------------------------------ Version 0.2 'Pumpkin' .... development version +2004-04-04 [jobi] 0.1.0devel29 +** fixed GRASS provider + 2004-04-03 [ts] 0.1.0devel28 ** Bug fix (still unconfirmed if it cures the bug!) for raster layer rendering artifacts. diff --git a/configure.in b/configure.in index 848c7d88fac..186c1580353 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl configure.in,v 1.51 2004/04/03 11:05:34 timlinux Exp +dnl configure.in,v 1.52 2004/04/04 15:27:33 jobi Exp AC_INIT @@ -23,7 +23,7 @@ dnl --------------------------------------------------------------------------- MAJOR_VERSION=0 MINOR_VERSION=1 MICRO_VERSION=0 -EXTRA_VERSION=28 +EXTRA_VERSION=29 if test $EXTRA_VERSION -eq 0; then VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION} else diff --git a/providers/grass/qgsgrassprovider.cpp b/providers/grass/qgsgrassprovider.cpp index d1940afbae3..e2e1577c5e0 100644 --- a/providers/grass/qgsgrassprovider.cpp +++ b/providers/grass/qgsgrassprovider.cpp @@ -236,6 +236,7 @@ QgsFeature *QgsGrassProvider::getNextFeature(bool fetchAttributes) { int cat, type, id, idx; unsigned char *wkb; + int wkbsize; #ifdef QGISDEBUG std::cout << "QgsGrassProvider::getNextFeature() mNextCidx = " << mNextCidx @@ -264,7 +265,6 @@ QgsFeature *QgsGrassProvider::getNextFeature(bool fetchAttributes) // TODO int may be 64 bits (memcpy) if ( type & (GV_POINTS | GV_LINES) ) { /* points or lines */ - int wkbsize; Vect_read_line ( mMap, mPoints, mCats, id); int npoints = mPoints->n_points; @@ -298,7 +298,7 @@ QgsFeature *QgsGrassProvider::getNextFeature(bool fetchAttributes) Vect_get_area_points ( mMap, id, mPoints ); int npoints = mPoints->n_points; - int wkbsize = 1+4+4+4+npoints*2*8; // size without islands + wkbsize = 1+4+4+4+npoints*2*8; // size without islands wkb = new unsigned char[wkbsize]; wkb[0] = (unsigned char) mEndian; int offset = 1; @@ -341,7 +341,7 @@ QgsFeature *QgsGrassProvider::getNextFeature(bool fetchAttributes) } } - f->setGeometry(wkb); + f->setGeometry(wkb, wkbsize); if ( fetchAttributes ) { QgsGrassProvider::setFeatureAttributes( mLayerId, cat, f );