Skip to content
Permalink
Browse files
[bugfix] Attribute table crashes QGIS when deleting selected
  • Loading branch information
elpaso committed May 12, 2017
1 parent 9149ffb commit 4f82b0ba529adad2ba71f5b128e9f331a0b80323
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/gui/attributetable/qgsattributetabledelegate.cpp
@@ -94,6 +94,18 @@ void QgsAttributeTableDelegate::setModelData( QWidget *editor, QAbstractItemMode
if ( !eww )
return;

// This fixes https://issues.qgis.org/issues/16492
QgsFeatureRequest request( fid );
request.setFlags( QgsFeatureRequest::NoGeometry );
request.setSubsetOfAttributes( QgsAttributeList( ) );
QgsFeature feature;
vl->getFeatures( request ).nextFeature( feature );
if ( ! feature.isValid( ) )
{
// Model is out of sync (again!).
return;
}

newValue = eww->value();

if (( oldValue != newValue && newValue.isValid() ) || oldValue.isNull() != newValue.isNull() )

0 comments on commit 4f82b0b

Please sign in to comment.