@@ -81,16 +81,6 @@ void QgsMapToolCapture::deactivate()
81
81
QgsMapToolAdvancedDigitizing::deactivate ();
82
82
}
83
83
84
- void QgsMapToolCapture::validationFinished ()
85
- {
86
- emit messageDiscarded ();
87
- QString msgFinished = tr ( " Validation finished" );
88
- if ( !mValidationWarnings .isEmpty () )
89
- {
90
- emit messageEmitted ( mValidationWarnings .join ( QStringLiteral ( " \n " ) ).append ( " \n " ).append ( msgFinished ), Qgis::Warning );
91
- }
92
- }
93
-
94
84
void QgsMapToolCapture::currentLayerChanged ( QgsMapLayer *layer )
95
85
{
96
86
if ( !mCaptureModeFromLayer )
@@ -688,7 +678,6 @@ void QgsMapToolCapture::validateGeometry()
688
678
mValidator = nullptr ;
689
679
}
690
680
691
- mValidationWarnings .clear ();
692
681
mGeomErrors .clear ();
693
682
while ( !mGeomErrorMarkers .isEmpty () )
694
683
{
@@ -726,20 +715,17 @@ void QgsMapToolCapture::validateGeometry()
726
715
method = QgsGeometry::ValidatorGeos;
727
716
mValidator = new QgsGeometryValidator ( geom, nullptr , method );
728
717
connect ( mValidator , &QgsGeometryValidator::errorFound, this , &QgsMapToolCapture::addError );
729
- connect ( mValidator , &QThread::finished, this , &QgsMapToolCapture::validationFinished );
730
718
mValidator ->start ();
731
719
QgsDebugMsgLevel ( " Validation started" , 4 );
732
720
}
733
721
734
- void QgsMapToolCapture::addError ( QgsGeometry::Error e )
722
+ void QgsMapToolCapture::addError ( const QgsGeometry::Error & e )
735
723
{
736
724
mGeomErrors << e;
737
725
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( mCanvas ->currentLayer () );
738
726
if ( !vlayer )
739
727
return ;
740
728
741
- mValidationWarnings << e.what ();
742
-
743
729
if ( e.hasWhere () )
744
730
{
745
731
QgsVertexMarker *vm = new QgsVertexMarker ( mCanvas );
@@ -751,9 +737,6 @@ void QgsMapToolCapture::addError( QgsGeometry::Error e )
751
737
vm->setZValue ( vm->zValue () + 1 );
752
738
mGeomErrorMarkers << vm;
753
739
}
754
-
755
- emit messageDiscarded ();
756
- emit messageEmitted ( mValidationWarnings .join ( QStringLiteral ( " \n " ) ), Qgis::Warning );
757
740
}
758
741
759
742
int QgsMapToolCapture::size ()
0 commit comments