Skip to content
Permalink
Browse files

Fix crash in attributetable when removing more than one column

References #16746
  • Loading branch information
signedav authored and m-kuhn committed Jul 17, 2017
1 parent 1f9512e commit fd9213ce72235bb5b361646bc747e9e19b2cde16
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/attributetable/qgsattributetablefiltermodel.cpp
@@ -197,7 +197,8 @@ void QgsAttributeTableFilterModel::setAttributeTableConfig( const QgsAttributeTa
{
if ( newColumnMapping.size() == mColumnMapping.size() - removedColumnCount )
{
beginRemoveColumns( QModelIndex(), firstRemovedColumn, firstRemovedColumn );
//the amount of removed column in the model need to be equal removedColumnCount
beginRemoveColumns( QModelIndex(), firstRemovedColumn, firstRemovedColumn+removedColumnCount-1 );
mColumnMapping = newColumnMapping;
endRemoveColumns();
}

0 comments on commit fd9213c

Please sign in to comment.
You can’t perform that action at this time.