Skip to content

Commit 02179ad

Browse files
signedavm-kuhn
authored andcommittedJul 18, 2017
Fix crash in attributetable when removing more than one column
References #16746
1 parent 7d094b0 commit 02179ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/gui/attributetable/qgsattributetablefiltermodel.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,8 @@ void QgsAttributeTableFilterModel::setAttributeTableConfig( const QgsAttributeTa
196196
{
197197
if ( newColumnMapping.size() == mColumnMapping.size() - removedColumnCount )
198198
{
199-
beginRemoveColumns( QModelIndex(), firstRemovedColumn, firstRemovedColumn );
199+
//the amount of removed column in the model need to be equal removedColumnCount
200+
beginRemoveColumns( QModelIndex(), firstRemovedColumn, firstRemovedColumn+removedColumnCount-1 );
200201
mColumnMapping = newColumnMapping;
201202
endRemoveColumns();
202203
}

0 commit comments

Comments
 (0)
Please sign in to comment.