Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Only change map extent when manually changing the active error
- Loading branch information
|
@@ -85,6 +85,7 @@ void QgsGeometryValidationDock::setGeometryValidationModel( QgsGeometryValidatio |
|
|
mErrorListView->setModel( mGeometryValidationModel ); |
|
|
|
|
|
connect( mErrorListView->selectionModel(), &QItemSelectionModel::currentChanged, this, &QgsGeometryValidationDock::onCurrentErrorChanged ); |
|
|
connect( mErrorListView->selectionModel(), &QItemSelectionModel::currentChanged, this, [this]() { updateMapCanvasExtent(); } ); |
|
|
connect( mGeometryValidationModel, &QgsGeometryValidationModel::dataChanged, this, &QgsGeometryValidationDock::onDataChanged ); |
|
|
connect( mGeometryValidationModel, &QgsGeometryValidationModel::rowsRemoved, this, &QgsGeometryValidationDock::updateCurrentError ); |
|
|
connect( mGeometryValidationModel, &QgsGeometryValidationModel::rowsInserted, this, &QgsGeometryValidationDock::onRowsInserted ); |
|
@@ -243,7 +244,10 @@ void QgsGeometryValidationDock::onCurrentErrorChanged( const QModelIndex ¤ |
|
|
|
|
|
bool hasFeature = !FID_IS_NULL( current.data( QgsGeometryValidationModel::ErrorFeatureIdRole ) ); |
|
|
mZoomToFeatureButton->setEnabled( hasFeature ); |
|
|
} |
|
|
|
|
|
void QgsGeometryValidationDock::updateMapCanvasExtent() |
|
|
{ |
|
|
if ( !mPreventZoomToError ) |
|
|
{ |
|
|
switch ( mLastZoomToAction ) |
|
|
|
@@ -46,6 +46,7 @@ class QgsGeometryValidationDock : public QgsDockWidget, public Ui_QgsGeometryVal |
|
|
private slots: |
|
|
void updateCurrentError(); |
|
|
void onCurrentErrorChanged( const QModelIndex ¤t, const QModelIndex &previous ); |
|
|
void updateMapCanvasExtent(); |
|
|
void onCurrentLayerChanged( QgsMapLayer *layer ); |
|
|
void onLayerEditingStatusChanged(); |
|
|
void onLayerDestroyed( QObject *layer ); |
|
|