File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 13
13
* *
14
14
***************************************************************************/
15
15
16
+ #include " qgsapplication.h"
16
17
#include " qgsattributetablemodel.h"
17
18
#include " qgsattributetablefiltermodel.h"
18
19
@@ -262,15 +263,15 @@ void QgsAttributeTableModel::loadAttributes()
262
263
attributes << idx;
263
264
}
264
265
265
- if ( columnCount () < attributes.size () )
266
+ if ( mFieldCount < attributes.size () )
266
267
{
267
268
ins = true ;
268
- beginInsertColumns ( QModelIndex (), columnCount () , attributes.size () - 1 );
269
+ beginInsertColumns ( QModelIndex (), mFieldCount , attributes.size () - 1 );
269
270
}
270
- else if ( attributes.size () < columnCount () )
271
+ else if ( attributes.size () < mFieldCount )
271
272
{
272
273
rm = true ;
273
- beginRemoveColumns ( QModelIndex (), attributes.size (), columnCount () - 1 );
274
+ beginRemoveColumns ( QModelIndex (), attributes.size (), mFieldCount - 1 );
274
275
}
275
276
276
277
mFieldCount = attributes.size ();
You can’t perform that action at this time.
0 commit comments