[QGIS Commit] r13574 - trunk/qgis/src/plugins/evis/eventbrowser

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue May 25 15:51:05 EDT 2010


Author: ersts
Date: 2010-05-25 15:51:03 -0400 (Tue, 25 May 2010)
New Revision: 13574

Modified:
   trunk/qgis/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
Log:
-Fix for ticket #2621
-Also fixed a bug in the select tool that was causing qgis to crash if no feature was selected.

Modified: trunk/qgis/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp
===================================================================
--- trunk/qgis/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp	2010-05-25 16:37:32 UTC (rev 13573)
+++ trunk/qgis/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp	2010-05-25 19:51:03 UTC (rev 13574)
@@ -258,7 +258,7 @@
    */
   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 @@
     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 )



More information about the QGIS-commit mailing list