Skip to content

Commit

Permalink
fix Z for topological editing when the dock widget is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nyalldawson committed Oct 26, 2019
1 parent 6fbc0c8 commit f774f0d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/gui/qgsadvanceddigitizingdockwidget.cpp
Expand Up @@ -687,9 +687,10 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent *e )
* but they do not take into account if when you snap on a vertex it has
* a Z value.
* To get the value we use the snapPoint method. However, we only apply it
* when the snapped point corresponds to the constrained point.
* when the snapped point corresponds to the constrained point or on an edge
* if the topological editing is activated.
*/
if ( mSnapMatch.hasVertex() && ( point == mSnapMatch.point() ) )
if ( ( mSnapMatch.hasVertex() && ( point == mSnapMatch.point() ) ) || ( mSnapMatch.hasEdge() && QgsProject::instance()->topologicalEditing() ) )
{
e->snapPoint();
}
Expand Down

0 comments on commit f774f0d

Please sign in to comment.