[Qgis-developer] Re: QgsMapCanvas & the overview

Martin Dobias wonder.sk at gmail.com
Thu Apr 6 06:42:31 EDT 2006


Hi Gavin,

you're right - with changing map canvas architecture I've changed
overview widget to a class derived from QWidget as this seemed much
better option than using QgsMapCanvas derived class - because of
special behaviour that is expected from overview.

I wasn't aware of that it affects QgsProject map canvas handling, so
please go ahead with the tidy ups. Just to note, overview widget is
completely controlled by main QgsMapCanvas, so there's no need to
access it from outside.


Bye,
Martin

On 4/6/06, Gavin Macaulay <gavin at macaulay.co.nz> wrote:
> 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