@@ -3398,6 +3398,11 @@ void QgisApp::deleteSelected()
3398
3398
3399
3399
void QgisApp::capturePoint ()
3400
3400
{
3401
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3402
+ {
3403
+ return ;
3404
+ }
3405
+
3401
3406
// set current map tool to select
3402
3407
mMapCanvas ->setMapTool (mMapTools .mCapturePoint );
3403
3408
@@ -3407,11 +3412,20 @@ void QgisApp::capturePoint()
3407
3412
3408
3413
void QgisApp::captureLine ()
3409
3414
{
3415
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3416
+ {
3417
+ return ;
3418
+ }
3419
+
3410
3420
mMapCanvas ->setMapTool (mMapTools .mCaptureLine );
3411
3421
}
3412
3422
3413
3423
void QgisApp::capturePolygon ()
3414
3424
{
3425
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3426
+ {
3427
+ return ;
3428
+ }
3415
3429
mMapCanvas ->setMapTool (mMapTools .mCapturePolygon );
3416
3430
}
3417
3431
@@ -3423,34 +3437,59 @@ void QgisApp::select()
3423
3437
3424
3438
void QgisApp::addVertex ()
3425
3439
{
3440
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3441
+ {
3442
+ return ;
3443
+ }
3426
3444
mMapCanvas ->setMapTool (mMapTools .mVertexAdd );
3427
3445
3428
3446
}
3429
3447
3430
3448
void QgisApp::moveVertex ()
3431
3449
{
3450
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3451
+ {
3452
+ return ;
3453
+ }
3432
3454
mMapCanvas ->setMapTool (mMapTools .mVertexMove );
3433
3455
}
3434
3456
3435
3457
void QgisApp::addRing ()
3436
3458
{
3459
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3460
+ {
3461
+ return ;
3462
+ }
3437
3463
mMapCanvas ->setMapTool (mMapTools .mAddRing );
3438
3464
}
3439
3465
3440
3466
void QgisApp::addIsland ()
3441
3467
{
3468
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3469
+ {
3470
+ return ;
3471
+ }
3442
3472
mMapCanvas ->setMapTool (mMapTools .mAddIsland );
3443
3473
}
3444
3474
3445
3475
3446
3476
void QgisApp::deleteVertex ()
3447
3477
{
3478
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3479
+ {
3480
+ return ;
3481
+ }
3448
3482
mMapCanvas ->setMapTool (mMapTools .mVertexDelete );
3449
3483
}
3450
3484
3451
3485
3452
3486
void QgisApp::editCut (QgsMapLayer * layerContainingSelection)
3453
3487
{
3488
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3489
+ {
3490
+ return ;
3491
+ }
3492
+
3454
3493
QgsMapLayer * selectionLayer = (layerContainingSelection != 0 ) ?
3455
3494
(layerContainingSelection) :
3456
3495
(activeLayer ());
@@ -3472,6 +3511,11 @@ void QgisApp::editCut(QgsMapLayer * layerContainingSelection)
3472
3511
3473
3512
void QgisApp::editCopy (QgsMapLayer * layerContainingSelection)
3474
3513
{
3514
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3515
+ {
3516
+ return ;
3517
+ }
3518
+
3475
3519
QgsMapLayer * selectionLayer = (layerContainingSelection != 0 ) ?
3476
3520
(layerContainingSelection) :
3477
3521
(activeLayer ());
@@ -3492,6 +3536,11 @@ void QgisApp::editCopy(QgsMapLayer * layerContainingSelection)
3492
3536
3493
3537
void QgisApp::editPaste (QgsMapLayer * destinationLayer)
3494
3538
{
3539
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3540
+ {
3541
+ return ;
3542
+ }
3543
+
3495
3544
QgsMapLayer * pasteLayer = (destinationLayer != 0 ) ?
3496
3545
(destinationLayer) :
3497
3546
(activeLayer ());
@@ -3529,6 +3578,12 @@ void QgisApp::refreshMapCanvas()
3529
3578
3530
3579
void QgisApp::toggleEditing ()
3531
3580
{
3581
+ if (mMapCanvas && mMapCanvas ->isDrawing ())
3582
+ {
3583
+ mActionToggleEditing ->setChecked (!mActionToggleEditing ->isChecked ());
3584
+ return ;
3585
+ }
3586
+
3532
3587
QgsLegendLayerFile* currentLayerFile = mMapLegend ->currentLayerFile ();
3533
3588
if (currentLayerFile)
3534
3589
{
0 commit comments