Skip to content
Permalink
Browse files

[ui] stop busy indicator when render widget is unchecked

  • Loading branch information
nirvn committed Feb 1, 2018
1 parent b5610ea commit f845e0276790c3bccc9942e701dc69c6439a18ea
Showing with 14 additions and 22 deletions.
  1. +12 −22 src/app/qgisapp.cpp
  2. +2 −0 src/gui/qgsmapcanvas.cpp
@@ -3133,35 +3133,25 @@ void QgisApp::setupConnections()
connect( mMapCanvas, &QgsMapCanvas::extentsChanged, this, &QgisApp::extentChanged );
connect( mMapCanvas, &QgsMapCanvas::scaleChanged, this, &QgisApp::showScale );
connect( mMapCanvas, &QgsMapCanvas::rotationChanged, this, &QgisApp::showRotation );
connect( mMapCanvas, &QgsMapCanvas::scaleChanged,
this, &QgisApp::updateMouseCoordinatePrecision );
connect( mMapCanvas, &QgsMapCanvas::mapToolSet,
this, &QgisApp::mapToolChanged );
connect( mMapCanvas, &QgsMapCanvas::selectionChanged,
this, &QgisApp::selectionChanged );
connect( mMapCanvas, &QgsMapCanvas::extentsChanged,
this, &QgisApp::markDirty );
connect( mMapCanvas, &QgsMapCanvas::layersChanged,
this, &QgisApp::markDirty );
connect( mMapCanvas, &QgsMapCanvas::scaleChanged, this, &QgisApp::updateMouseCoordinatePrecision );
connect( mMapCanvas, &QgsMapCanvas::mapToolSet, this, &QgisApp::mapToolChanged );
connect( mMapCanvas, &QgsMapCanvas::selectionChanged, this, &QgisApp::selectionChanged );
connect( mMapCanvas, &QgsMapCanvas::extentsChanged, this, &QgisApp::markDirty );
connect( mMapCanvas, &QgsMapCanvas::layersChanged, this, &QgisApp::markDirty );

connect( mMapCanvas, &QgsMapCanvas::zoomLastStatusChanged, mActionZoomLast, &QAction::setEnabled );
connect( mMapCanvas, &QgsMapCanvas::zoomNextStatusChanged, mActionZoomNext, &QAction::setEnabled );

connect( mMapCanvas, &QgsMapCanvas::zoomLastStatusChanged,
mActionZoomLast, &QAction::setEnabled );
connect( mMapCanvas, &QgsMapCanvas::zoomNextStatusChanged,
mActionZoomNext, &QAction::setEnabled );
connect( mRenderSuppressionCBox, &QAbstractButton::toggled,
this, [ = ]( bool flag )
connect( mRenderSuppressionCBox, &QAbstractButton::toggled, this, [ = ]( bool flag )
{
Q_FOREACH ( QgsMapCanvas *canvas, mapCanvases() )
canvas->setRenderFlag( flag );
}
);
} );

connect( mMapCanvas, &QgsMapCanvas::destinationCrsChanged,
this, &QgisApp::reprojectAnnotations );
connect( mMapCanvas, &QgsMapCanvas::destinationCrsChanged, this, &QgisApp::reprojectAnnotations );

// connect MapCanvas keyPress event so we can check if selected feature collection must be deleted
connect( mMapCanvas, &QgsMapCanvas::keyPressed,
this, &QgisApp::mapCanvas_keyPressed );
connect( mMapCanvas, &QgsMapCanvas::keyPressed, this, &QgisApp::mapCanvas_keyPressed );

// project crs connections
connect( QgsProject::instance(), &QgsProject::crsChanged, this, &QgisApp::projectCrsChanged );
@@ -695,6 +695,8 @@ void QgsMapCanvas::stopRendering()
connect( mJob, &QgsMapRendererQImageJob::finished, mJob, &QgsMapRendererQImageJob::deleteLater );
mJob->cancelWithoutBlocking();
mJob = nullptr;

emit mapCanvasRefreshed();
}
stopPreviewJobs();
}

0 comments on commit f845e02

Please sign in to comment.
You can’t perform that action at this time.