Skip to content

Commit d36597a

Browse files
committed
better fix for b99ab0a
1 parent f10a8cc commit d36597a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/gui/qgsmapcanvasitem.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@
2727
#include "qgslogger.h"
2828

2929
QgsMapCanvasItem::QgsMapCanvasItem( QgsMapCanvas* mapCanvas )
30-
: QGraphicsItem( 0, mapCanvas->scene() )
30+
: QGraphicsItem()
3131
, mMapCanvas( mapCanvas )
3232
, mPanningOffset( 0, 0 )
3333
, mItemSize( 0, 0 )
3434
{
35+
Q_ASSERT( mapCanvas && mapCanvas->scene() );
36+
mapCanvas->scene()->addItem( this );
3537
}
3638

3739
QgsMapCanvasItem::~QgsMapCanvasItem()

0 commit comments

Comments
 (0)