AW: [Qgis-developer] rendercontext-branch
Hugentobler Marco
marco.hugentobler at karto.baug.ethz.ch
Thu May 1 10:02:01 EDT 2008
Hi Tom,
Thanks for reporting this issues. I agree that it would be better to have threaded rendering in the long term. Your suggestion of disabling the window resize for mac in the short term sounds reasonable. I'm going to start my old G4 to see how it looks like there.
I also realized that it is not possible to stop rendering progress if incremental screen refresh is disabled, as processEvents() will not be called. Maybe I'm trying to change that, but then it might also be a problem for mac.
Regards,
Marco
-----Ursprüngliche Nachricht-----
Von: qgis-developer-bounces at lists.osgeo.org im Auftrag von Tom Elwertowski
Gesendet: Do 01.05.2008 09:26
Cc: qgis-developer at lists.osgeo.org
Betreff: Re: [Qgis-developer] rendercontext-branch
Marco Hugentobler wrote:
> Note that the render context branch is now in a stage where it can be tested.
I found two Mac rendering problems:
When QGIS first starts up, the screen is scrambled: the map canvas is drawn twice, the window title is inside the window and the toolbar icons are rendered inside (not floating over) the map canvas. This is caused by calling processEvents() from inside a paint event. I did not track down the call. Opening a file will unscramble the window. Including a file on the command line will prevent the initial scramble.
The second problem is caused by a non-zero feature rendering count. The bug is also present in trunk but I first noticed it now. When a window is resized, it will snap back to its original size after an incremental update. The window content remains at the new size but the window frame reverts back to the old size. This is caused by calling processEvents() in QgsVectorLayer::draw(). (WMS layers also have this bug due to calling processEvents() from QgsHttpTransaction::getSynchronously() from QgsWmsProvider::draw().)
Mac paint events must be serialized. If another paint event is pending when processEvents() is called, the newer one will start. When the call stack later unwinds, the earlier paint event resumes with a context that is no longer valid.
Long drawing operations are usually done in a thread so that the main thread can call processEvents() to listen for keyboard events such as a cancel key without interfering with the drawing process. Until we can move to a threaded design, we should disable the Mac resize control when incremental drawing is enabled or else conditionalize the incremental drawing code for non-Macs.
Tom
_______________________________________________
Qgis-developer mailing list
Qgis-developer at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer
More information about the Qgis-developer
mailing list