Skip to content

Commit

Permalink
[composer] Fix guide sizing under qt5 (fix #15432)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 15, 2016
1 parent 2d191f6 commit 2976646
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/core/composer/qgscomposeritem.cpp
Expand Up @@ -1297,7 +1297,9 @@ QGraphicsLineItem* QgsComposerItem::hAlignSnapItem()
if ( !mHAlignSnapItem )
{
mHAlignSnapItem = new QGraphicsLineItem( nullptr );
mHAlignSnapItem->setPen( QPen( QColor( Qt::red ) ) );
QPen pen = QPen( QColor( Qt::red ) );
pen.setWidthF( 0.0 );
mHAlignSnapItem->setPen( pen );
scene()->addItem( mHAlignSnapItem );
mHAlignSnapItem->setZValue( 90 );
}
Expand All @@ -1309,7 +1311,9 @@ QGraphicsLineItem* QgsComposerItem::vAlignSnapItem()
if ( !mVAlignSnapItem )
{
mVAlignSnapItem = new QGraphicsLineItem( nullptr );
mVAlignSnapItem->setPen( QPen( QColor( Qt::red ) ) );
QPen pen = QPen( QColor( Qt::red ) );
pen.setWidthF( 0.0 );
mVAlignSnapItem->setPen( pen );
scene()->addItem( mVAlignSnapItem );
mVAlignSnapItem->setZValue( 90 );
}
Expand Down
8 changes: 6 additions & 2 deletions src/core/composer/qgscomposermousehandles.cpp
Expand Up @@ -1162,7 +1162,9 @@ QGraphicsLineItem* QgsComposerMouseHandles::hAlignSnapItem()
if ( !mHAlignSnapItem )
{
mHAlignSnapItem = new QGraphicsLineItem( nullptr );
mHAlignSnapItem->setPen( QPen( QColor( Qt::red ) ) );
QPen pen = QPen( QColor( Qt::red ) );
pen.setWidthF( 0.0 );
mHAlignSnapItem->setPen( pen );
scene()->addItem( mHAlignSnapItem );
mHAlignSnapItem->setZValue( 90 );
}
Expand All @@ -1174,7 +1176,9 @@ QGraphicsLineItem* QgsComposerMouseHandles::vAlignSnapItem()
if ( !mVAlignSnapItem )
{
mVAlignSnapItem = new QGraphicsLineItem( nullptr );
mVAlignSnapItem->setPen( QPen( QColor( Qt::red ) ) );
QPen pen = QPen( QColor( Qt::red ) );
pen.setWidthF( 0.0 );
mVAlignSnapItem->setPen( pen );
scene()->addItem( mVAlignSnapItem );
mVAlignSnapItem->setZValue( 90 );
}
Expand Down

0 comments on commit 2976646

Please sign in to comment.