File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,12 @@ void QgsNodeTool2::deactivate()
258258 setHighlightedNodes ( QList<Vertex>() );
259259 removeTemporaryRubberBands ();
260260 cleanupNodeEditor ();
261+
262+ QHash< QPair<QgsVectorLayer *, QgsFeatureId>, GeometryValidation>::iterator it = mValidations .begin ();
263+ for ( ; it != mValidations .end (); ++it )
264+ it->cleanup ();
265+ mValidations .clear ();
266+
261267 QgsMapToolAdvancedDigitizing::deactivate ();
262268}
263269
@@ -1701,6 +1707,13 @@ void QgsNodeTool2::validationFinished()
17011707 {
17021708 QStatusBar *sb = QgisApp::instance ()->statusBar ();
17031709 sb->showMessage ( tr ( " Validation finished (%n error(s) found)." , " number of geometry errors" , validation.errorMarkers .size () ) );
1710+ if ( validation.errorMarkers .isEmpty () )
1711+ {
1712+ // not needed anymore (no markers to keep displayed)
1713+ validation.cleanup ();
1714+ mValidations .remove ( it.key () );
1715+ }
1716+ break ;
17041717 }
17051718 }
17061719}
You can’t perform that action at this time.
0 commit comments