[QGIS-Developer] QgsMapCanvas refresh for geometries only possible?
Nyall Dawson
nyall.dawson at gmail.com
Wed May 30 04:50:13 PDT 2018
On 30 May 2018 at 20:57, Mark Johnson <mj10777 at googlemail.com> wrote:
> I have the impression that when in the main QGis Canvas only a geometry
> (with QgsMapTool / QgsVectorLayer) is being changed, only the geometry is
> being refreshed and not the underlining Rasters (which have not changed).
>
> I would like to know how this is done since I am working with an adapted
> Georeferencer with QgsMapTool / QgsVectorLayer for the points, where when
> the Pixel-Point is moved in the Georeferencer-MapCanvas both the geometry
> and the Raster are being refreshed, which when multiple points need to be
> moved is quite time consuming.
>
> I have looked through the QgisApp, QgsMapTool, QgsMapLayer/QgsVectorLayer
> classes but I fail to see what is being done differently.
>
> If an hint could be given where this done, I would be grateful.
Is this within a separate QgsMapCanvas? If so, look into the options:
QgsMapCanvas::setCachingEnabled()
QgsMapCanvas::setParallelRenderingEnabled()
QgsMapCanvas::setMapUpdateInterval();
It might be worthwhile copying the code from
QgisApp::applyDefaultSettingsToCanvas so that the same settings apply
as do for the main canvas.
Nyall
More information about the QGIS-Developer
mailing list