Skip to content

Commit fd9213c

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

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
@@ -197,7 +197,8 @@ void QgsAttributeTableFilterModel::setAttributeTableConfig( const QgsAttributeTa
197197
{
198198
if ( newColumnMapping.size() == mColumnMapping.size() - removedColumnCount )
199199
{
200-
beginRemoveColumns( QModelIndex(), firstRemovedColumn, firstRemovedColumn );
200+
//the amount of removed column in the model need to be equal removedColumnCount
201+
beginRemoveColumns( QModelIndex(), firstRemovedColumn, firstRemovedColumn+removedColumnCount-1 );
201202
mColumnMapping = newColumnMapping;
202203
endRemoveColumns();
203204
}

0 commit comments

Comments
 (0)
Please sign in to comment.