@@ -488,9 +488,10 @@ QgisApp::~QgisApp()
488
488
delete mMapTools .mReshapeFeatures ;
489
489
delete mMapTools .mSplitFeatures ;
490
490
delete mMapTools .mSelect ;
491
- delete mMapTools .mVertexAdd ;
492
- delete mMapTools .mVertexMove ;
493
- delete mMapTools .mVertexDelete ;
491
+ // these three tools to be deprecated - use node tool rather
492
+ // delete mMapTools.mVertexAdd;
493
+ // delete mMapTools.mVertexMove;
494
+ // delete mMapTools.mVertexDelete;
494
495
delete mMapTools .mAddRing ;
495
496
delete mMapTools .mSimplifyFeature ;
496
497
delete mMapTools .mDeleteRing ;
@@ -693,6 +694,8 @@ void QgisApp::createActions()
693
694
connect ( mActionDeleteSelected , SIGNAL ( triggered () ), this , SLOT ( deleteSelected () ) );
694
695
mActionDeleteSelected ->setEnabled ( false );
695
696
697
+ // these three tools to be deprecated - use node tool rather
698
+ /* *
696
699
mActionAddVertex = new QAction( getThemeIcon( "mActionAddVertex.png" ), tr( "Add Vertex" ), this );
697
700
shortcuts->registerAction( mActionAddVertex );
698
701
mActionAddVertex->setStatusTip( tr( "Add Vertex" ) );
@@ -710,6 +713,7 @@ void QgisApp::createActions()
710
713
mActionDeleteVertex->setStatusTip( tr( "Delete Vertex" ) );
711
714
connect( mActionDeleteVertex, SIGNAL( triggered() ), this, SLOT( deleteVertex() ) );
712
715
mActionDeleteVertex->setEnabled( false );
716
+ */
713
717
714
718
mActionAddRing = new QAction ( getThemeIcon ( " mActionAddRing.png" ), tr ( " Add Ring" ), this );
715
719
shortcuts->registerAction ( mActionAddRing );
@@ -1094,12 +1098,15 @@ void QgisApp::createActionGroups()
1094
1098
mActionSplitFeatures ->setCheckable ( true );
1095
1099
mMapToolGroup ->addAction ( mActionSplitFeatures );
1096
1100
mMapToolGroup ->addAction ( mActionDeleteSelected );
1101
+ // these three tools are deprecated - use node tool rather
1102
+ /* *
1097
1103
mActionAddVertex->setCheckable( true );
1098
1104
mMapToolGroup->addAction( mActionAddVertex );
1099
1105
mActionDeleteVertex->setCheckable( true );
1100
1106
mMapToolGroup->addAction( mActionDeleteVertex );
1101
1107
mActionMoveVertex->setCheckable( true );
1102
1108
mMapToolGroup->addAction( mActionMoveVertex );
1109
+ */
1103
1110
mActionAddRing ->setCheckable ( true );
1104
1111
mMapToolGroup ->addAction ( mActionAddRing );
1105
1112
mActionAddIsland ->setCheckable ( true );
@@ -1195,9 +1202,10 @@ void QgisApp::createMenus()
1195
1202
mEditMenu ->addAction ( mActionCapturePolygon );
1196
1203
mEditMenu ->addAction ( mActionMoveFeature );
1197
1204
mEditMenu ->addAction ( mActionDeleteSelected );
1198
- mEditMenu ->addAction ( mActionAddVertex );
1199
- mEditMenu ->addAction ( mActionMoveVertex );
1200
- mEditMenu ->addAction ( mActionDeleteVertex );
1205
+ // these three tools are deprecated - use node tool rather
1206
+ // mEditMenu->addAction( mActionAddVertex );
1207
+ // mEditMenu->addAction( mActionMoveVertex );
1208
+ // mEditMenu->addAction( mActionDeleteVertex );
1201
1209
1202
1210
mActionEditSeparator2 = mEditMenu ->addSeparator ();
1203
1211
@@ -1397,9 +1405,11 @@ void QgisApp::createToolBars()
1397
1405
mDigitizeToolBar ->addAction ( mActionCaptureLine );
1398
1406
mDigitizeToolBar ->addAction ( mActionCapturePolygon );
1399
1407
mDigitizeToolBar ->addAction ( mActionMoveFeature );
1400
- mDigitizeToolBar ->addAction ( mActionMoveVertex );
1401
- mDigitizeToolBar ->addAction ( mActionAddVertex );
1402
- mDigitizeToolBar ->addAction ( mActionDeleteVertex );
1408
+ mDigitizeToolBar ->addAction ( mActionNodeTool );
1409
+ // these three tools are deprecated - use node tool rather
1410
+ // mDigitizeToolBar->addAction( mActionMoveVertex );
1411
+ // mDigitizeToolBar->addAction( mActionAddVertex );
1412
+ // mDigitizeToolBar->addAction( mActionDeleteVertex );
1403
1413
mDigitizeToolBar ->addAction ( mActionDeleteSelected );
1404
1414
mDigitizeToolBar ->addAction ( mActionCutFeatures );
1405
1415
mDigitizeToolBar ->addAction ( mActionCopyFeatures );
@@ -1419,7 +1429,6 @@ void QgisApp::createToolBars()
1419
1429
mAdvancedDigitizeToolBar ->addAction ( mActionReshapeFeatures );
1420
1430
mAdvancedDigitizeToolBar ->addAction ( mActionSplitFeatures );
1421
1431
mAdvancedDigitizeToolBar ->addAction ( mActionMergeFeatures );
1422
- mAdvancedDigitizeToolBar ->addAction ( mActionNodeTool );
1423
1432
mAdvancedDigitizeToolBar ->addAction ( mActionRotatePointSymbols );
1424
1433
mToolbarMenu ->addAction ( mAdvancedDigitizeToolBar ->toggleViewAction () );
1425
1434
@@ -1664,9 +1673,11 @@ void QgisApp::setTheme( QString theThemeName )
1664
1673
mActionReshapeFeatures ->setIcon ( getThemeIcon ( " /mActionReshape.png" ) );
1665
1674
mActionSplitFeatures ->setIcon ( getThemeIcon ( " /mActionSplitFeatures.png" ) );
1666
1675
mActionDeleteSelected ->setIcon ( getThemeIcon ( " /mActionDeleteSelected.png" ) );
1667
- mActionAddVertex ->setIcon ( getThemeIcon ( " /mActionAddVertex.png" ) );
1668
- mActionMoveVertex ->setIcon ( getThemeIcon ( " /mActionMoveVertex.png" ) );
1669
- mActionDeleteVertex ->setIcon ( getThemeIcon ( " /mActionDeleteVertex.png" ) );
1676
+ // these three icons to be deprecated
1677
+ // mActionAddVertex->setIcon( getThemeIcon( "/mActionAddVertex.png" ) );
1678
+ // mActionMoveVertex->setIcon( getThemeIcon( "/mActionMoveVertex.png" ) );
1679
+ // mActionDeleteVertex->setIcon( getThemeIcon( "/mActionDeleteVertex.png" ) );
1680
+ mActionNodeTool ->setIcon ( getThemeIcon ( " /mActionNodeTool.png" ) );
1670
1681
mActionSimplifyFeature ->setIcon ( getThemeIcon ( " /mActionSimplify.png" ) );
1671
1682
mActionUndo ->setIcon ( getThemeIcon ( " /mActionUndo.png" ) );
1672
1683
mActionRedo ->setIcon ( getThemeIcon ( " /mActionRedo.png" ) );
@@ -1676,7 +1687,6 @@ void QgisApp::setTheme( QString theThemeName )
1676
1687
mActionDeletePart ->setIcon ( getThemeIcon ( " /mActionDeletePart.png" ) );
1677
1688
mActionMergeFeatures ->setIcon ( getThemeIcon ( " /mActionMergeFeatures.png" ) );
1678
1689
mActionRotatePointSymbols ->setIcon ( getThemeIcon ( " mActionRotatePointSymbols.png" ) );
1679
- mActionNodeTool ->setIcon ( getThemeIcon ( " /mActionNodeTool.png" ) );
1680
1690
mActionZoomIn ->setIcon ( getThemeIcon ( " /mActionZoomIn.png" ) );
1681
1691
mActionZoomOut ->setIcon ( getThemeIcon ( " /mActionZoomOut.png" ) );
1682
1692
mActionZoomFullExtent ->setIcon ( getThemeIcon ( " /mActionZoomFullExtent.png" ) );
@@ -1798,12 +1808,13 @@ void QgisApp::createCanvas()
1798
1808
mMapTools .mSplitFeatures ->setAction ( mActionSplitFeatures );
1799
1809
mMapTools .mSelect = new QgsMapToolSelect ( mMapCanvas );
1800
1810
mMapTools .mSelect ->setAction ( mActionSelect );
1801
- mMapTools .mVertexAdd = new QgsMapToolAddVertex ( mMapCanvas );
1802
- mMapTools .mVertexAdd ->setAction ( mActionAddVertex );
1803
- mMapTools .mVertexMove = new QgsMapToolMoveVertex ( mMapCanvas );
1804
- mMapTools .mVertexMove ->setAction ( mActionMoveVertex );
1805
- mMapTools .mVertexDelete = new QgsMapToolDeleteVertex ( mMapCanvas );
1806
- mMapTools .mVertexDelete ->setAction ( mActionDeleteVertex );
1811
+ // these three tools to be deprecated - use node tool rather
1812
+ // mMapTools.mVertexAdd = new QgsMapToolAddVertex( mMapCanvas );
1813
+ // mMapTools.mVertexAdd->setAction( mActionAddVertex );
1814
+ // mMapTools.mVertexMove = new QgsMapToolMoveVertex( mMapCanvas );
1815
+ // mMapTools.mVertexMove->setAction( mActionMoveVertex );
1816
+ // mMapTools.mVertexDelete = new QgsMapToolDeleteVertex( mMapCanvas );
1817
+ // mMapTools.mVertexDelete->setAction( mActionDeleteVertex );
1807
1818
mMapTools .mAddRing = new QgsMapToolAddRing ( mMapCanvas );
1808
1819
mMapTools .mAddRing ->setAction ( mActionAddRing );
1809
1820
mMapTools .mAddIsland = new QgsMapToolAddIsland ( mMapCanvas );
@@ -5716,9 +5727,10 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
5716
5727
mActionCapturePolygon ->setEnabled ( false );
5717
5728
mActionCaptureLine ->setVisible ( false );
5718
5729
mActionCapturePolygon ->setVisible ( false );
5719
- mActionAddVertex ->setEnabled ( false );
5720
- mActionDeleteVertex ->setEnabled ( false );
5721
- mActionMoveVertex ->setEnabled ( false );
5730
+ // these three tools to be deprecated - use node tool rather
5731
+ // mActionAddVertex->setEnabled( false );
5732
+ // mActionDeleteVertex->setEnabled( false );
5733
+ // mActionMoveVertex->setEnabled( false );
5722
5734
mActionAddRing ->setEnabled ( false );
5723
5735
mActionAddIsland ->setEnabled ( false );
5724
5736
mActionReshapeFeatures ->setEnabled ( false );
@@ -5804,9 +5816,10 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
5804
5816
// are add/delete/move vertex supported?
5805
5817
if ( vlayer->isEditable () && dprovider->capabilities () & QgsVectorDataProvider::ChangeGeometries )
5806
5818
{
5807
- mActionAddVertex ->setEnabled ( true );
5808
- mActionMoveVertex ->setEnabled ( true );
5809
- mActionDeleteVertex ->setEnabled ( true );
5819
+ // these three tools to be deprecated - use node tool rather
5820
+ // mActionAddVertex->setEnabled( true );
5821
+ // mActionMoveVertex->setEnabled( true );
5822
+ // mActionDeleteVertex->setEnabled( true );
5810
5823
if ( vlayer->geometryType () == QGis::Polygon )
5811
5824
{
5812
5825
mActionAddRing ->setEnabled ( true );
@@ -5817,9 +5830,9 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
5817
5830
}
5818
5831
else
5819
5832
{
5820
- mActionAddVertex ->setEnabled ( false );
5821
- mActionMoveVertex ->setEnabled ( false );
5822
- mActionDeleteVertex ->setEnabled ( false );
5833
+ // mActionAddVertex->setEnabled( false );
5834
+ // mActionMoveVertex->setEnabled( false );
5835
+ // mActionDeleteVertex->setEnabled( false );
5823
5836
}
5824
5837
return ;
5825
5838
}
@@ -5839,15 +5852,16 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
5839
5852
mActionDeleteSelected ->setEnabled ( false );
5840
5853
mActionAddRing ->setEnabled ( false );
5841
5854
mActionAddIsland ->setEnabled ( false );
5842
- mActionAddVertex ->setEnabled ( false );
5843
- mActionDeleteVertex ->setEnabled ( false );
5844
- mActionMoveVertex ->setEnabled ( false );
5855
+ // these three tools to be deprecated - use node tool rather
5856
+ // mActionAddVertex->setEnabled( false );
5857
+ // mActionDeleteVertex->setEnabled( false );
5858
+ // mActionMoveVertex->setEnabled( false );
5859
+ mActionNodeTool ->setEnabled ( false );
5845
5860
mActionMoveFeature ->setEnabled ( false );
5846
5861
mActionCopyFeatures ->setEnabled ( false );
5847
5862
mActionCutFeatures ->setEnabled ( false );
5848
5863
mActionPasteFeatures ->setEnabled ( false );
5849
5864
mActionRotatePointSymbols ->setEnabled ( false );
5850
- mActionNodeTool ->setEnabled ( false );
5851
5865
mActionDeletePart ->setEnabled ( false );
5852
5866
5853
5867
// NOTE: This check does not really add any protection, as it is called on load not on layer select/activate
0 commit comments