Skip to content

Commit 7e69248

Browse files
committed
fix #5523
1 parent 4365efd commit 7e69248

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/gui/attributetable/qgsattributetablemodel.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,15 @@ void QgsAttributeTableModel::attributeDeleted( int idx )
164164
Q_UNUSED( idx );
165165
QgsDebugMsg( "entered." );
166166
loadAttributes();
167-
loadLayer();
167+
for ( int row = 0; row <= mRowIdMap.size(); row++ )
168+
{
169+
QgsFeatureId fid = rowToId( row );
170+
171+
if( !mFeatureMap.contains( fid ) )
172+
continue;
173+
174+
mFeatureMap[ fid ].deleteAttribute( idx );
175+
}
168176
emit modelChanged();
169177
}
170178

0 commit comments

Comments
 (0)