Skip to content
Browse files

Only update CAD canvas item geometry when necessary

The call to setRect() in paint() handler was triggering canvas redraws
all the time, keeping one CPU core busy nearly all the time when
CAD dock was active.
  • Loading branch information
wonder-sk authored and 3nids committed Sep 12, 2017
1 parent 684e1da commit 407baf03e04193a7c1d6a3e5e7e63e2648fb93df
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/qgsadvanceddigitizingcanvasitem.cpp
@@ -42,7 +42,8 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter* painter )

QgsRectangle mapRect = mMapCanvas->extent();
setRect( mapRect );
if ( rect() != mapRect )
setRect( mapRect );

int nPoints = mAdvancedDigitizingDockWidget->pointsCount();
if ( !nPoints )

0 comments on commit 407baf0

Please sign in to comment.
You can’t perform that action at this time.