Skip to content
Permalink
Browse files

wip use page as item parent

  • Loading branch information
nyalldawson committed Jul 19, 2017
1 parent 76b8ba7 commit 8fa173bda8f3a4ec087d35255eb25eca9be5dbf8
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/core/layout/qgslayoutitem.cpp
@@ -78,7 +78,7 @@ void QgsLayoutItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *it
}

double destinationDpi = itemStyle->matrix.m11() * 25.4;
bool useImageCache = true;
bool useImageCache = false;

if ( useImageCache )
{
@@ -224,7 +224,10 @@ void QgsLayoutItem::setScenePos( const QPointF &destinationPos )
//since setPos does not account for item rotation, use difference between
//current scenePos (which DOES account for rotation) and destination pos
//to calculate how much the item needs to move
setPos( pos() + ( destinationPos - scenePos() ) );
if ( parentItem() )
setPos( pos() + ( destinationPos - scenePos() ) + parentItem()->scenePos() );
else
setPos( pos() + ( destinationPos - scenePos() ) );
}

double QgsLayoutItem::itemRotation() const

0 comments on commit 8fa173b

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