AW: [Qgis-developer] rendercontext-branch

Hugentobler Marco marco.hugentobler at karto.baug.ethz.ch
Thu May 1 11:40:22 EDT 2008


Ok, I now compiled the branch on the G4 (in debug mode). I don't have the two issues, it does not scramble and also the main window resizes properly (does not snap back). Should I try also release mode or maybe the problem is more likely to appear on newer (faster) hardware?

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