Skip to content
Permalink
Browse files
Use wait cursor when building indexes for snapping
  • Loading branch information
wonder-sk committed Feb 11, 2015
1 parent bbc7cba commit 1f5b6fd
Showing 1 changed file with 3 additions and 0 deletions.
@@ -3,6 +3,7 @@
#include "qgsmapcanvas.h"
#include "qgsvectorlayer.h"

#include <QApplication>
#include <QProgressDialog>

QgsMapCanvasSnappingUtils::QgsMapCanvasSnappingUtils( QgsMapCanvas* canvas, QObject* parent )
@@ -30,6 +31,7 @@ void QgsMapCanvasSnappingUtils::canvasCurrentLayerChanged()

void QgsMapCanvasSnappingUtils::prepareIndexStarting( int count )
{
QApplication::setOverrideCursor( Qt::WaitCursor );
mProgress = new QProgressDialog( tr( "Indexing data..." ), QString(), 0, count, mCanvas->topLevelWidget() );
mProgress->setWindowModality( Qt::WindowModal );
}
@@ -41,5 +43,6 @@ void QgsMapCanvasSnappingUtils::prepareIndexProgress( int index )
{
delete mProgress;
mProgress = 0;
QApplication::restoreOverrideCursor();
}
}

0 comments on commit 1f5b6fd

Please sign in to comment.