mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Fix the selected error
This commit is contained in:
parent
e65f6b46a7
commit
35d7fdc810
@ -173,11 +173,16 @@ void QgsGeometryValidationDock::onCurrentErrorChanged( const QModelIndex ¤
|
||||
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 ¤tError : qgis::as_const( mTopologyErrorStorage[layer] ) )
|
||||
const auto &errors = mTopologyErrorStorage[layer];
|
||||
for ( const auto ¤tError : errors )
|
||||
{
|
||||
if ( currentError.get() == error )
|
||||
{
|
||||
|
@ -66,6 +66,8 @@ void QgsGeometryValidationService::fixError( QgsGeometryCheckError *error, int m
|
||||
}
|
||||
}
|
||||
|
||||
layer->triggerRepaint();
|
||||
|
||||
emit topologyErrorUpdated( layer, error );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user