File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 24
24
25
25
#include < QtGui>
26
26
#include < QVariant>
27
+ #include < limits>
27
28
28
29
// //////////////////////////
29
30
// QgsAttributeTableModel //
32
33
QgsAttributeTableModel::QgsAttributeTableModel ( QgsVectorLayer *theLayer, QObject *parent )
33
34
: QAbstractTableModel( parent )
34
35
{
36
+ mFeat .setFeatureId ( std::numeric_limits<int >::min () );
35
37
mLayer = theLayer;
36
38
mFeatureCount = mLayer ->pendingFeatureCount ();
37
39
loadAttributes ();
@@ -273,7 +275,7 @@ int QgsAttributeTableModel::rowToId( const int id ) const
273
275
{
274
276
QgsDebugMsg ( QString ( " rowToId: row %1 not in the map" ).arg ( id ) );
275
277
// return negative infinite (to avoid collision with newly added features)
276
- return - 999999 ;
278
+ return std::numeric_limits< int >:: min () ;
277
279
}
278
280
279
281
return mRowIdMap [id];
You can’t perform that action at this time.
0 commit comments