Navigation Menu

Skip to content

Commit

Permalink
take Z only for topology eiditing
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nyalldawson committed Oct 26, 2019
1 parent 8e9d8e7 commit 6fbc0c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgsmaptoolcapture.cpp
Expand Up @@ -32,6 +32,7 @@
#include "qgssettings.h"
#include "qgsapplication.h"
#include "qgsadvanceddigitizingdockwidget.h"
#include "qgsproject.h"

#include <QAction>
#include <QCursor>
Expand Down Expand Up @@ -383,7 +384,7 @@ int QgsMapToolCapture::fetchLayerPoint( const QgsPointLocator::Match &match, Qgs
{
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( mCanvas->currentLayer() );
QgsVectorLayer *sourceLayer = match.layer();
if ( match.isValid() && ( match.hasVertex() || match.hasEdge() ) && sourceLayer &&
if ( match.isValid() && ( match.hasVertex() || ( QgsProject::instance()->topologicalEditing() && match.hasEdge() ) ) && sourceLayer &&
( sourceLayer->crs() == vlayer->crs() ) )
{
QgsFeature f;
Expand All @@ -396,7 +397,7 @@ int QgsMapToolCapture::fetchLayerPoint( const QgsPointLocator::Match &match, Qgs
if ( !f.geometry().vertexIdFromVertexNr( match.vertexIndex(), vId ) )
return 2;

if ( match.hasEdge() )
if ( QgsProject::instance()->topologicalEditing() && match.hasEdge() )
{
QgsVertexId vId2;
if ( !f.geometry().vertexIdFromVertexNr( match.vertexIndex() + 1, vId2 ) )
Expand Down

0 comments on commit 6fbc0c8

Please sign in to comment.