Skip to content
Permalink
Browse files
Cleanup of validation objects and markers
  • Loading branch information
wonder-sk committed Apr 6, 2017
1 parent 9619d5e commit 80cef5105075d91771366a815158c72f7386808f
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/app/nodetool/qgsnodetool2.cpp
@@ -258,6 +258,12 @@ void QgsNodeTool2::deactivate()
setHighlightedNodes( QList<Vertex>() );
removeTemporaryRubberBands();
cleanupNodeEditor();

QHash< QPair<QgsVectorLayer *, QgsFeatureId>, GeometryValidation>::iterator it = mValidations.begin();
for ( ; it != mValidations.end(); ++it )
it->cleanup();
mValidations.clear();

QgsMapToolAdvancedDigitizing::deactivate();
}

@@ -1701,6 +1707,13 @@ void QgsNodeTool2::validationFinished()
{
QStatusBar *sb = QgisApp::instance()->statusBar();
sb->showMessage( tr( "Validation finished (%n error(s) found).", "number of geometry errors", validation.errorMarkers.size() ) );
if ( validation.errorMarkers.isEmpty() )
{
// not needed anymore (no markers to keep displayed)
validation.cleanup();
mValidations.remove( it.key() );
}
break;
}
}
}

0 comments on commit 80cef51

Please sign in to comment.