[Qgis-developer] Re: [QGIS Commit] [g_j_m] r5068 -
trunk/qgis/src/gui
Brendan Morley
morb at beagle.com.au
Mon Mar 20 06:39:33 EST 2006
Gavin,
An idea I had for getting around the nested paint event is this:
Somehow we "triple-buffer" the canvas, where Qt provides the first 2
buffers and canvas operations write to the third.
Then a paint event is "simply" a matter of copying the third buffer to
the first pair. - a quick event. Before and after, the canvas can
continue to be composed.
Thoughts?
Brendan
On Mon, 2006-03-20 at 02:42 +0000, noreply at qgis.org wrote:
> Author: g_j_m
> Date: 2006-03-20 02:42:21 +0000 (Mon, 20 Mar 2006)
> New Revision: 5068
>
> Modified:
> trunk/qgis/src/gui/qgsmaprender.cpp
> Log:
> Add a little debug output to make clear the source of the QPaintEngine
> error
>
>
> Modified: trunk/qgis/src/gui/qgsmaprender.cpp
> ===================================================================
> --- trunk/qgis/src/gui/qgsmaprender.cpp 2006-03-19 17:58:13 UTC (rev 5067)
> +++ trunk/qgis/src/gui/qgsmaprender.cpp 2006-03-20 02:42:21 UTC (rev 5068)
> @@ -205,6 +205,15 @@
> std::cout << "QgsMapRender::render: at layer item '" << (*li).toLocal8Bit().data() << "'." << std::endl;
> #endif
>
> + // This call is supposed to cause the progress bar to
> + // advance. However, it seems that updating the progress bar is
> + // incompatible with having a QPainter active (the one that is
> + // passed into this function), as Qt produces a number of errors
> + // when try to do so. I'm (Gavin) not sure how to fix this, but
> + // added these comments and debug statement to help others...
> + std::cerr << "If there is a QPaintEngine here, it is caused by an emit "
> + "call just after line " << __LINE__ << " in file " << __FILE__ << ".\n";
> +
> emit setProgress(myRenderCounter++,layers.size());
> QgsMapLayer *ml = QgsMapLayerRegistry::instance()->mapLayer(*li);
>
--
Brendan Morley <morb at ozemail.com.au>
More information about the Qgis-developer
mailing list