Skip to content

Commit

Permalink
[vector] Fix bogus assert when adding polygons with topological edit …
Browse files Browse the repository at this point in the history
…toggled on
  • Loading branch information
nirvn committed Apr 6, 2020
1 parent 16283f6 commit b9cd835
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/qgsmaptooladdfeature.cpp
Expand Up @@ -34,6 +34,7 @@
#include "qgisapp.h"
#include "qgsexpressioncontextutils.h"
#include "qgsrubberband.h"

#include <QSettings>

QgsMapToolAddFeature::QgsMapToolAddFeature( QgsMapCanvas *canvas, CaptureMode mode )
Expand Down Expand Up @@ -91,7 +92,7 @@ void QgsMapToolAddFeature::digitized( const QgsFeature &f )
if ( topologicalEditing )
{
QList<QgsPointLocator::Match> sm = snappingMatches();
Q_ASSERT( f.geometry().constGet()->vertexCount() == sm.size() );
Q_ASSERT( f.geometry().constGet()->vertexCount() == ( vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ? sm.size() + 1 : sm.size() ) );
for ( int i = 0; i < sm.size() ; ++i )
{
if ( sm.at( i ).layer() )
Expand Down

0 comments on commit b9cd835

Please sign in to comment.