Skip to content

Commit afe64ab

Browse files
author
ersts
committed
-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/qgis@13574 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 06a1492 commit afe64ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ bool eVisGenericEventBrowserGui::initBrowser( )
258258
*/
259259
if ( 0 == mVectorLayer->selectedFeatureCount( ) ) //if nothing is selected select everything
260260
{
261-
QgsRectangle myRect = mDataProvider->extent( );
261+
QgsRectangle myRect;
262262
mVectorLayer->select( myRect, true );
263263
mFeatureIds = mVectorLayer->selectedFeaturesIds( ).toList( );
264264
}
@@ -267,6 +267,8 @@ bool eVisGenericEventBrowserGui::initBrowser( )
267267
mFeatureIds = mVectorLayer->selectedFeaturesIds( ).toList( );
268268
}
269269

270+
if ( 0 == mFeatureIds.size( ) ) { return false; }
271+
270272
//get the first feature in the list so we can set the field in the pulldown menues
271273
QgsFeature* myFeature = featureAtId( mFeatureIds.at( mCurrentFeatureIndex ) );
272274
if ( !myFeature )

0 commit comments

Comments
 (0)