Skip to content

Commit

Permalink
Use wait cursor when building indexes for snapping
Browse files Browse the repository at this point in the history
  • 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 changes: 3 additions & 0 deletions src/gui/qgsmapcanvassnappingutils.cpp
Expand Up @@ -3,6 +3,7 @@
#include "qgsmapcanvas.h"
#include "qgsvectorlayer.h"

#include <QApplication>
#include <QProgressDialog>

QgsMapCanvasSnappingUtils::QgsMapCanvasSnappingUtils( QgsMapCanvas* canvas, QObject* parent )
Expand Down Expand Up @@ -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 );
}
Expand All @@ -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.