[Qgis-developer] QgsMapCanvas & the overview

Gavin Macaulay gavin at macaulay.co.nz
Thu Apr 6 06:05:55 EDT 2006


Hi,

While sorting out a map units bug I've found something else that that
needs resolving (or at least clarifying):

Code in QgsProject makes the assumption that the map overview is a
variable of type QgsMapCanvas* (e.g., the QgsProject::_findMapCanvas()
function). This is not the case anymore as the overview is its own class
(QgsMapOverviewCanvas), and does not derive from QgsMapCanvas.
Incidentally, this is the cause of the message:

Debug: Unable to find canvas widget theOverviewCanvas

when loading a saved project (Qgis is trying to find a widget called
theOverviewCanvas of type QgsMapCanvas, but there isn't one anymore).

It seems like the recent changes to how the overview and map canvases are
implemented hasn't been fully reflected in the QgsProject code. I'm happy
to remove/tidy up the QgsProject code but want to check first that this
seems reasonable and is in line with Martin's reorganisation of the canvas
code.

Regards

Gavin






More information about the Qgis-developer mailing list