mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Render incremental rendering image at proper location
The old behavior was to render it at the currently visibleExtent based on the map canvas. The job may however have been scheduled for a different extent and therefore rendered at an improper location.
This commit is contained in:
parent
0d8cb3c1a9
commit
2e972b13ba
@ -89,6 +89,13 @@ class QgsMapRendererJob : QObject
|
||||
//! Find out how log it took to finish the job (in miliseconds)
|
||||
int renderingTime() const;
|
||||
|
||||
/**
|
||||
* Return map settings with which this job was started.
|
||||
* @return A QgsMapSettings instance with render settings
|
||||
* @note added in 2.8
|
||||
*/
|
||||
const QgsMapSettings& mapSettings() const;
|
||||
|
||||
signals:
|
||||
|
||||
//! emitted when asynchronous rendering is finished (or canceled).
|
||||
|
@ -56,6 +56,11 @@ void QgsMapRendererJob::setCache( QgsMapRendererCache* cache )
|
||||
mCache = cache;
|
||||
}
|
||||
|
||||
const QgsMapSettings& QgsMapRendererJob::mapSettings() const
|
||||
{
|
||||
return mSettings;
|
||||
}
|
||||
|
||||
|
||||
bool QgsMapRendererJob::reprojectToLayerExtent( const QgsCoordinateTransform* ct, bool layerCrsGeographic, QgsRectangle& extent, QgsRectangle& r2 )
|
||||
{
|
||||
|
@ -126,6 +126,13 @@ class CORE_EXPORT QgsMapRendererJob : public QObject
|
||||
//! Find out how log it took to finish the job (in miliseconds)
|
||||
int renderingTime() const { return mRenderingTime; }
|
||||
|
||||
/**
|
||||
* Return map settings with which this job was started.
|
||||
* @return A QgsMapSettings instance with render settings
|
||||
* @note added in 2.8
|
||||
*/
|
||||
const QgsMapSettings& mapSettings() const;
|
||||
|
||||
signals:
|
||||
|
||||
//! emitted when asynchronous rendering is finished (or canceled).
|
||||
|
@ -737,10 +737,9 @@ void QgsMapCanvas::rendererJobFinished()
|
||||
|
||||
void QgsMapCanvas::mapUpdateTimeout()
|
||||
{
|
||||
mMap->setContent( mJob->renderedImage(), mSettings.visibleExtent() );
|
||||
mMap->setContent( mJob->renderedImage(), mJob->mapSettings().visibleExtent() );
|
||||
}
|
||||
|
||||
|
||||
void QgsMapCanvas::stopRendering()
|
||||
{
|
||||
if ( mJob )
|
||||
|
Loading…
x
Reference in New Issue
Block a user