Skip to content

Commit

Permalink
[labeling] Show a wait cursor while building label property dialog
Browse files Browse the repository at this point in the history
and auxiliary field creation is required

This can take some time (30 seconds or so), and without the wait
cursor it looks like QGIS has hung...
  • Loading branch information
nyalldawson committed Jul 17, 2019
1 parent c8a6ced commit 78b7f90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgsmaptoollabel.cpp
Expand Up @@ -28,6 +28,7 @@
#include "qgsvectorlayerjoininfo.h"
#include "qgsvectorlayerjoinbuffer.h"
#include "qgsauxiliarystorage.h"
#include "qgsgui.h"

#include <QMouseEvent>

Expand Down Expand Up @@ -765,6 +766,7 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexe
if ( !vlayer->auxiliaryLayer() )
return false;

QgsTemporaryCursorOverride cursor( Qt::WaitCursor );
for ( const QgsPalLayerSettings::Property &p : qgis::as_const( mPalProperties ) )
{
int index = -1;
Expand Down Expand Up @@ -812,6 +814,7 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIn
if ( !vlayer->auxiliaryLayer() )
return false;

QgsTemporaryCursorOverride cursor( Qt::WaitCursor );
for ( const QgsDiagramLayerSettings::Property &p : qgis::as_const( mDiagramProperties ) )
{
int index = -1;
Expand Down

0 comments on commit 78b7f90

Please sign in to comment.