Skip to content

Commit

Permalink
make sure all the rubber band frames are deleted in composer. Fixes bug
Browse files Browse the repository at this point in the history
#1573

git-svn-id: http://svn.osgeo.org/qgis/trunk@10544 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 12, 2009
1 parent 24e6248 commit a012920
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/composer/qgscomposeritem.cpp
Expand Up @@ -237,6 +237,13 @@ void QgsComposerItem::mousePressEvent( QGraphicsSceneMouseEvent * event )
mLastMouseEventPos = event->lastScenePos();
mCurrentMouseMoveAction = mouseMoveActionForPosition( event->pos() );

//remove the old rubber band item if it is still there
if ( mBoundingResizeRectangle )
{
scene()->removeItem( mBoundingResizeRectangle );
delete mBoundingResizeRectangle;
mBoundingResizeRectangle = 0;
}
//create and show bounding rectangle
mBoundingResizeRectangle = new QGraphicsRectItem( 0 );
scene()->addItem( mBoundingResizeRectangle );
Expand Down

0 comments on commit a012920

Please sign in to comment.