Skip to content

Commit

Permalink
[bugfix] Attribute table crashes QGIS when deleting selected
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed May 12, 2017
1 parent 9149ffb commit 4f82b0b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/gui/attributetable/qgsattributetabledelegate.cpp
Expand Up @@ -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() )
Expand Down

0 comments on commit 4f82b0b

Please sign in to comment.