Skip to content

Commit 1f5b6fd

Browse files
committed
Use wait cursor when building indexes for snapping
1 parent bbc7cba commit 1f5b6fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gui/qgsmapcanvassnappingutils.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "qgsmapcanvas.h"
44
#include "qgsvectorlayer.h"
55

6+
#include <QApplication>
67
#include <QProgressDialog>
78

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

3132
void QgsMapCanvasSnappingUtils::prepareIndexStarting( int count )
3233
{
34+
QApplication::setOverrideCursor( Qt::WaitCursor );
3335
mProgress = new QProgressDialog( tr( "Indexing data..." ), QString(), 0, count, mCanvas->topLevelWidget() );
3436
mProgress->setWindowModality( Qt::WindowModal );
3537
}
@@ -41,5 +43,6 @@ void QgsMapCanvasSnappingUtils::prepareIndexProgress( int index )
4143
{
4244
delete mProgress;
4345
mProgress = 0;
46+
QApplication::restoreOverrideCursor();
4447
}
4548
}

0 commit comments

Comments
 (0)