[QGIS-trac] Re: [Quantum GIS] #2150: QgsMapCanvas.refresh() doesn't reload WMS layer

Quantum GIS qgis at qgis.org
Sun Apr 24 17:33:23 EDT 2011


#2150: QgsMapCanvas.refresh() doesn't reload WMS layer
-----------------------------------------------------+----------------------
        Reporter:  trapanator                        |         Owner:  nobody       
            Type:  bug                               |        Status:  closed       
        Priority:  major: does not work as expected  |     Milestone:  Version 1.7.0
       Component:  MapCanvas                         |       Version:  Trunk        
      Resolution:  worksforme                        |      Keywords:               
Platform_version:                                    |      Platform:  Windows      
        Must_fix:  Yes                               |   Status_info:  0            
-----------------------------------------------------+----------------------
Changes (by mhugent):

  * status:  new => closed
  * resolution:  => worksforme


Comment:

 Try to reload the layers before refreshing the canvas (that's how qgisapp
 does it):

 C++:
 QgsMapLayerRegistry::instance()->reloadAllLayers();
 mMapCanvas->refresh();

 Python:
 QgsMapLayerRegistry.instance().reloadAllLayers()
 qgis.utils.iface.mapCanvas().refresh()

 Hope it works (otherwise reopen the ticket)

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/2150#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS supporting GDAL/OGR, PostGIS, and GRASS formats, and Web Services


More information about the QGIS-trac mailing list