Skip to content
Permalink
Browse files
move declaration of vlayer
  • Loading branch information
lbartoletti authored and nyalldawson committed Sep 12, 2021
1 parent 93a66ae commit 06f78b1e551e04bdb86cf50ff31f701515b67af9
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/gui/qgsadvanceddigitizingdockwidget.cpp
@@ -319,10 +319,9 @@ void QgsAdvancedDigitizingDockWidget::setCadEnabled( bool enabled )

void QgsAdvancedDigitizingDockWidget::switchZM( )
{
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( mMapCanvas->currentLayer() );
if ( vlayer )
{

if ( QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( mMapCanvas->currentLayer() ) )
{
const QgsWkbTypes::Type type = vlayer->wkbType();
mRelativeZButton->setEnabled( QgsWkbTypes::hasZ( type ) );
mZLabel->setEnabled( QgsWkbTypes::hasZ( type ) );

0 comments on commit 06f78b1

Please sign in to comment.