Skip to content
Permalink
Browse files

Fix the selected error

  • Loading branch information
m-kuhn committed Oct 3, 2018
1 parent e65f6b4 commit 35d7fdc810f3dedd4ff61e2e3d2d8c799e72801c
@@ -173,11 +173,16 @@ void QgsGeometryValidationDock::onCurrentErrorChanged( const QModelIndex &curren
mPreviousButton->setEnabled( current.isValid() && current.row() > 0 );

mProblemDetailWidget->setVisible( current.isValid() );

if ( !current.isValid() )
return;

mProblemDescriptionLabel->setText( current.data( QgsGeometryValidationModel::DetailsRole ).toString() );

QgsGeometryCheckError *error = current.data( QgsGeometryValidationModel::GeometryCheckErrorRole ).value<QgsGeometryCheckError *>();
if ( error )
{
delete mResolutionWidget->layout();
const QStringList resolutionMethods = error->check()->resolutionMethods();
QGridLayout *layout = new QGridLayout( mResolutionWidget );
int resolutionIndex = 0;
@@ -333,7 +333,8 @@ void QgsGeometryValidationModel::onTopologyErrorUpdated( QgsVectorLayer *layer,
if ( layer == mCurrentLayer )
{
int i = 0;
for ( const auto &currentError : qgis::as_const( mTopologyErrorStorage[layer] ) )
const auto &errors = mTopologyErrorStorage[layer];
for ( const auto &currentError : errors )
{
if ( currentError.get() == error )
{
@@ -66,6 +66,8 @@ void QgsGeometryValidationService::fixError( QgsGeometryCheckError *error, int m
}
}

layer->triggerRepaint();

emit topologyErrorUpdated( layer, error );
}

0 comments on commit 35d7fdc

Please sign in to comment.
You can’t perform that action at this time.