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 1f5b6fd0f3d4523ee1bf2283b9b671895760e143
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/gui/qgsmapcanvassnappingutils.cpp
@@ -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.
You can’t perform that action at this time.