Skip to content
Permalink
Browse files

Merge pull request #7122 from nyalldawson/fix_19065

Use a snapping indicator when picking feature to move with move tool
  • Loading branch information
m-kuhn committed May 31, 2018
2 parents 497abfe + de347f0 commit a26b9b1de32b337684a6749d442a6342f20fb5d0
Showing with 8 additions and 3 deletions.
  1. +4 −3 src/app/qgisapp.cpp
  2. +4 −0 src/app/qgsmaptoolmovefeature.cpp
@@ -2811,6 +2811,9 @@ void QgisApp::createToolBars()
connect( tbAddRegularPolygon, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddRegularPolygon );

// Cad toolbar
mAdvancedDigitizeToolBar->insertAction( mActionRotateFeature, mAdvancedDigitizingDockWidget->enableAction() );

// move feature tool button
QToolButton *moveFeatureButton = new QToolButton( mAdvancedDigitizeToolBar );
moveFeatureButton->setPopupMode( QToolButton::MenuButtonPopup );
@@ -2828,7 +2831,7 @@ void QgisApp::createToolBars()
};
moveFeatureButton->setDefaultAction( defAction );
connect( moveFeatureButton, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mAdvancedDigitizeToolBar->insertWidget( mAdvancedDigitizingDockWidget->enableAction(), moveFeatureButton );
mAdvancedDigitizeToolBar->insertWidget( mActionRotateFeature, moveFeatureButton );

bt = new QToolButton();
bt->setPopupMode( QToolButton::MenuButtonPopup );
@@ -2850,8 +2853,6 @@ void QgisApp::createToolBars()
pointSymbolAction->setObjectName( QStringLiteral( "ActionPointSymbolTools" ) );
connect( bt, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );

// Cad toolbar
mAdvancedDigitizeToolBar->insertAction( mActionRotateFeature, mAdvancedDigitizingDockWidget->enableAction() );
}

void QgisApp::createStatusBar()
@@ -57,6 +57,10 @@ void QgsMapToolMoveFeature::cadCanvasMoveEvent( QgsMapMouseEvent *e )
mRubberBand->update();
mSnapIndicator->setMatch( e->mapPointMatch() );
}
else
{
mSnapIndicator->setMatch( e->mapPointMatch() );
}
}

void QgsMapToolMoveFeature::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

0 comments on commit a26b9b1

Please sign in to comment.
You can’t perform that action at this time.