Skip to content

Commit

Permalink
-Fix for ticket #2621
Browse files Browse the repository at this point in the history
-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/qgis@13574 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
ersts committed May 25, 2010
1 parent 06a1492 commit afe64ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
Expand Up @@ -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( );
}
Expand All @@ -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 )
Expand Down

0 comments on commit afe64ab

Please sign in to comment.