Skip to content
Permalink
Browse files

log message when adding feature fails (#33151)

  • Loading branch information
3nids authored and nyalldawson committed Nov 29, 2019
1 parent 8fdb992 commit 10b6e042864437eea4877e115c32db0df6aa58a4
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/qgsvectorlayereditbuffer.cpp
@@ -20,6 +20,8 @@
#include "qgsvectordataprovider.h"
#include "qgsvectorlayer.h"
#include "qgsvectorlayerutils.h"
#include "qgsmessagelog.h"


//! populate two lists (ks, vs) from map - in reverse order
template <class Key, class T> void mapToReversedLists( const QMap< Key, T > &map, QList<Key> &ks, QList<T> &vs )
@@ -119,7 +121,10 @@ bool QgsVectorLayerEditBuffer::addFeature( QgsFeature &f )
return false;
}
if ( L->mFields.count() != f.attributes().count() )
{
QgsMessageLog::logMessage( tr( "cannot add feature, wrong field count: layer: %1 feature: %2:" ).arg( L->mFields.count() ).arg( f.attributes().count() ) );
return false;
}

// TODO: check correct geometry type

0 comments on commit 10b6e04

Please sign in to comment.
You can’t perform that action at this time.