@@ -286,7 +286,7 @@ void QgsMapCanvas::drawContents(QPainter * p, int cx, int cy, int cw, int ch)
286
286
std::cout << " QgsMapCanvas::drawContents" << std::endl;
287
287
#endif
288
288
289
- if (mDirty && !mFrozen )
289
+ if (mDirty && mRenderFlag && !mFrozen )
290
290
{
291
291
render ();
292
292
@@ -304,35 +304,27 @@ void QgsMapCanvas::render()
304
304
{
305
305
306
306
#ifdef QGISDEBUG
307
- QString msg = mFrozen ? " frozen" : " thawed" ;
308
- std::cout << " QgsMapCanvas::render: canvas is " << msg.toLocal8Bit ().data () << std::endl;
307
+ std::cout << " QgsMapCanvas::render" << std::endl;
309
308
#endif
310
309
311
- if (!mFrozen )
312
- {
313
- if (mRenderFlag && mDirty )
314
- {
315
- // Tell the user we're going to be a while
316
- QApplication::setOverrideCursor (Qt::WaitCursor);
310
+ // Tell the user we're going to be a while
311
+ QApplication::setOverrideCursor (Qt::WaitCursor);
317
312
318
- mMap ->render ();
319
- mDirty = false ;
320
-
321
- // notify any listeners that rendering is complete
322
- QPainter p;
323
- p.begin (&mMap ->pixmap ());
324
- emit renderComplete (&p);
325
- p.end ();
326
-
327
- // notifies current map tool
328
- if (mMapTool )
329
- mMapTool ->renderComplete ();
330
-
331
- // Tell the user we've finished going to be a while
332
- QApplication::restoreOverrideCursor ();
333
- }
313
+ mMap ->render ();
314
+ mDirty = false ;
334
315
335
- }
316
+ // notify any listeners that rendering is complete
317
+ QPainter p;
318
+ p.begin (&mMap ->pixmap ());
319
+ emit renderComplete (&p);
320
+ p.end ();
321
+
322
+ // notifies current map tool
323
+ if (mMapTool )
324
+ mMapTool ->renderComplete ();
325
+
326
+ // Tell the user we've finished going to be a while
327
+ QApplication::restoreOverrideCursor ();
336
328
337
329
} // render
338
330
0 commit comments