Skip to content
Permalink
Browse files
-Fix for ticket #2621
-Also fixed a bug in the select tool that was causing qgis to crash if no feature was selected.

git-svn-id: http://svn.osgeo.org/qgis/trunk@13574 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed May 25, 2010
1 parent 56442d7 commit 89296f1eb2305e7a4f533ddfce763c4e6e64a7ff
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
@@ -258,7 +258,7 @@ bool eVisGenericEventBrowserGui::initBrowser( )
*/
if ( 0 == mVectorLayer->selectedFeatureCount( ) ) //if nothing is selected select everything
{
QgsRectangle myRect = mDataProvider->extent( );
QgsRectangle myRect;
mVectorLayer->select( myRect, true );
mFeatureIds = mVectorLayer->selectedFeaturesIds( ).toList( );
}
@@ -267,6 +267,8 @@ bool eVisGenericEventBrowserGui::initBrowser( )
mFeatureIds = mVectorLayer->selectedFeaturesIds( ).toList( );
}

if ( 0 == mFeatureIds.size( ) ) { return false; }

//get the first feature in the list so we can set the field in the pulldown menues
QgsFeature* myFeature = featureAtId( mFeatureIds.at( mCurrentFeatureIndex ) );
if ( !myFeature )

0 comments on commit 89296f1

Please sign in to comment.