Showing with 10 additions and 41 deletions.
  1. +3 −3 ms-windows/osgeo4w/package-nightly.cmd
  2. +3 −3 ms-windows/osgeo4w/package.cmd
  3. +4 −35 src/core/qgsvectorlayer.cpp
6 changes: 3 additions & 3 deletions ms-windows/osgeo4w/package-nightly.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ cmake -G "Visual Studio 9 2008" ^
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
-D GEOS_LIBRARY=%OSGEO4W_ROOT%/lib/geos_c_i.lib ^
-D PYTHON_EXECUTABLE=%O4W_ROOT%/bin/python.exe ^
-D PYTHON_INCLUDE_PATH=%O4W_ROOT%/apps/Python25/include ^
-D PYTHON_LIBRARY=%O4W_ROOT%/apps/Python25/libs/python25.lib ^
-D SIP_BINARY_PATH=%O4W_ROOT%/apps/Python25/sip.exe ^
-D PYTHON_INCLUDE_PATH=%O4W_ROOT%/apps/Python27/include ^
-D PYTHON_LIBRARY=%O4W_ROOT%/apps/Python27/libs/python27.lib ^
-D SIP_BINARY_PATH=%O4W_ROOT%/apps/Python27/sip.exe ^
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION% ^
-D QT_BINARY_DIR=%O4W_ROOT%/bin ^
-D QT_LIBRARY_DIR=%O4W_ROOT%/lib ^
Expand Down
6 changes: 3 additions & 3 deletions ms-windows/osgeo4w/package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ cmake -G "Visual Studio 9 2008" ^
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
-D GEOS_LIBRARY=%OSGEO4W_ROOT%/lib/geos_c_i.lib ^
-D PYTHON_EXECUTABLE=%O4W_ROOT%/bin/python.exe ^
-D PYTHON_INCLUDE_PATH=%O4W_ROOT%/apps/Python25/include ^
-D PYTHON_LIBRARY=%O4W_ROOT%/apps/Python25/libs/python25.lib ^
-D SIP_BINARY_PATH=%O4W_ROOT%/apps/Python25/sip.exe ^
-D PYTHON_INCLUDE_PATH=%O4W_ROOT%/apps/Python27/include ^
-D PYTHON_LIBRARY=%O4W_ROOT%/apps/Python27/libs/python27.lib ^
-D SIP_BINARY_PATH=%O4W_ROOT%/apps/Python27/sip.exe ^
-D GRASS_PREFIX=%O4W_ROOT%/apps/grass/grass-%GRASS_VERSION% ^
-D QT_BINARY_DIR=%O4W_ROOT%/bin ^
-D QT_LIBRARY_DIR=%O4W_ROOT%/lib ^
Expand Down
39 changes: 4 additions & 35 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3971,44 +3971,13 @@ const QgsFeatureIds& QgsVectorLayer::selectedFeaturesIds() const

QgsFeatureList QgsVectorLayer::selectedFeatures()
{
if ( !mDataProvider )
{
return QgsFeatureList();
}

QgsFeatureList features;

QgsAttributeList allAttrs = mDataProvider->attributeIndexes();
mFetchAttributes = pendingAllAttributesList();

for ( QgsFeatureIds::iterator it = mSelectedFeatureIds.begin(); it != mSelectedFeatureIds.end(); ++it )
foreach( QgsFeatureId fid, mSelectedFeatureIds )
{
QgsFeature feat;

bool selectionIsAddedFeature = false;

// Check this selected item against the uncommitted added features
for ( QgsFeatureList::iterator iter = mAddedFeatures.begin(); iter != mAddedFeatures.end(); ++iter )
{
if ( *it == iter->id() )
{
feat = QgsFeature( *iter );
selectionIsAddedFeature = true;
break;
}
}

// if the geometry is not newly added, get it from provider
if ( !selectionIsAddedFeature )
{
mDataProvider->featureAtId( *it, feat, true, allAttrs );
}

updateFeatureAttributes( feat );
updateFeatureGeometry( feat );

features << feat;
} // for each selected
features.push_back( QgsFeature() );
featureAtId( fid, features.back(), true, true );
}

return features;
}
Expand Down