Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
move declaration of vlayer
  • Loading branch information
lbartoletti authored and nyalldawson committed Sep 12, 2021
1 parent 93a66ae commit 06f78b1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gui/qgsadvanceddigitizingdockwidget.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit 06f78b1

Please sign in to comment.