Skip to content

Commit 0113308

Browse files
author
telwertowski
committedJan 26, 2006
Remove calls to processEvent which are short-circuiting the draw event in Qt4.
Something in our draw event is triggering another draw event during resizing. processEvent immediately moves to the next draw event. For X11, menus and toolbars became corrupted and crashes occurred. For Mac, the map canvas did not resize at all. The following warnings were appearing on the console: "QWidget::repaint: recursive repaint detected" and "QPixmap::operator=: Cannot assign to pixmap during painting." Event processing to capture a keyboard cancel command should be reinstated when the source of the recursion is found and fixed. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4753 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed
 

‎src/gui/qgsvectorlayer.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,9 @@ void QgsVectorLayer::drawLabels(QPainter * p, QgsRect * viewExtent, QgsMapToPixe
417417
#ifdef QGISDEBUG
418418
std::cerr << "Total features processed is " << featureCount << std::endl;
419419
#endif
420-
qApp->processEvents();
420+
// XXX Something in our draw event is triggering an additional draw event when resizing [TE 01/26/06]
421+
// XXX Calling this will begin processing the next draw event causing image havoc and recursion crashes.
422+
//qApp->processEvents();
421423

422424
}
423425
}
@@ -876,7 +878,9 @@ void QgsVectorLayer::draw(QPainter * p, QgsRect * viewExtent, QgsMapToPixel * th
876878
// std::cout << "QgsVectorLayer::draw: got " << fet->featureId() << std::endl;
877879
#endif
878880

879-
qApp->processEvents(); //so we can trap for esc press
881+
// XXX Something in our draw event is triggering an additional draw event when resizing [TE 01/26/06]
882+
// XXX Calling this will begin processing the next draw event causing image havoc and recursion crashes.
883+
//qApp->processEvents(); //so we can trap for esc press
880884
if (mDrawingCancelled) return;
881885
// If update threshold is greater than 0, check to see if
882886
// the threshold has been exceeded
@@ -968,7 +972,9 @@ void QgsVectorLayer::draw(QPainter * p, QgsRect * viewExtent, QgsMapToPixel * th
968972
#ifdef QGISDEBUG
969973
std::cerr << "Total features processed is " << featureCount << std::endl;
970974
#endif
971-
qApp->processEvents();
975+
// XXX Something in our draw event is triggering an additional draw event when resizing [TE 01/26/06]
976+
// XXX Calling this will begin processing the next draw event causing image havoc and recursion crashes.
977+
//qApp->processEvents();
972978
}
973979
else
974980
{

0 commit comments

Comments
 (0)
Please sign in to comment.