mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
log message when adding feature fails (#33151)
This commit is contained in:
parent
7333adecaf
commit
27341850b0
@ -20,6 +20,8 @@
|
|||||||
#include "qgsvectordataprovider.h"
|
#include "qgsvectordataprovider.h"
|
||||||
#include "qgsvectorlayer.h"
|
#include "qgsvectorlayer.h"
|
||||||
#include "qgsvectorlayerutils.h"
|
#include "qgsvectorlayerutils.h"
|
||||||
|
#include "qgsmessagelog.h"
|
||||||
|
|
||||||
|
|
||||||
//! populate two lists (ks, vs) from map - in reverse order
|
//! 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 )
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if ( L->mFields.count() != f.attributes().count() )
|
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;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: check correct geometry type
|
// TODO: check correct geometry type
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user