Skip to content
Permalink
Browse files

[Geometry checker] Trigger repaint instead of explicit refresh

  • Loading branch information
manisandro committed Jul 14, 2016
1 parent 332e1d4 commit f2f93d610d2ab4bd833f7c8b26ed9f482b521286
@@ -240,6 +240,11 @@ bool QgsGeometryChecker::fixError( QgsGeometryCheckError* error, int method )
return true;
}

QgsMapLayer* QgsGeometryChecker::getLayer() const
{
return mFeaturePool->getLayer();
}

void QgsGeometryChecker::runCheck( const QgsGeometryCheck* check )
{
// Run checks
@@ -27,6 +27,7 @@ typedef QSet<QgsFeatureId> QgsFeatureIds;
class QgsFeaturePool;
class QgsGeometryCheck;
class QgsGeometryCheckError;
class QgsMapLayer;
class QgsVectorLayer;
class QMutex;

@@ -38,6 +39,7 @@ class QgsGeometryChecker : public QObject
~QgsGeometryChecker();
QFuture<void> execute( int* totalSteps = nullptr );
bool fixError( QgsGeometryCheckError *error, int method );
QgsMapLayer* getLayer() const;
const QList<QgsGeometryCheck*> getChecks() const { return mChecks; }
const QStringList& getMessages() const { return mMessages; }

@@ -391,7 +391,6 @@ void QgsGeometryCheckerResultTab::highlightErrors( bool current )
}

mIface->mapCanvas()->setExtent( totextent );
mIface->mapCanvas()->refresh();
}

void QgsGeometryCheckerResultTab::onSelectionChanged( const QItemSelection &newSel, const QItemSelection &/*oldSel*/ )
@@ -502,8 +501,7 @@ void QgsGeometryCheckerResultTab::fixErrors( bool prompt )
ui.progressBarFixErrors->setVisible( false );
unsetCursor();
}

mIface->mapCanvas()->refresh();
mChecker->getLayer()->triggerRepaint();

if ( mStatistics.itemCount() > 0 )
{
@@ -125,6 +125,7 @@ void QgsGeometryCheckerFixDialog::fixError()

QgsGeometryCheckError* error = mErrors.at( 0 );
mChecker->fixError( error, mRadioGroup->checkedId() );
mChecker->getLayer()->triggerRepaint();

unsetCursor();

@@ -165,7 +166,6 @@ void QgsGeometryCheckerFixDialog::fixError()
}
adjustSize();
emit currentErrorChanged( error );
mIface->mapCanvas()->refresh();
}

void QgsGeometryCheckerFixDialog::skipError()

0 comments on commit f2f93d6

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