Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bad tests in composerview (fix #9285)
  • Loading branch information
nyalldawson committed Jan 4, 2014
1 parent 31e37af commit bee1291
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgscomposerview.cpp
Expand Up @@ -390,7 +390,7 @@ void QgsComposerView::addShape( Tool currentTool )
else if ( currentTool == AddTriangle )
shape = QgsComposerShape::Triangle;

if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )
if ( !mRubberBandItem || ( mRubberBandItem->rect().width() < 0.1 && mRubberBandItem->rect().height() < 0.1 ) )
{
removeRubberBand();
return;
Expand Down Expand Up @@ -691,7 +691,7 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
break;

case AddMap:
if ( !mRubberBandItem || mRubberBandItem->rect().width() < 0.1 || mRubberBandItem->rect().width() < 0.1 )
if ( !mRubberBandItem || ( mRubberBandItem->rect().width() < 0.1 && mRubberBandItem->rect().height() < 0.1 ) )
{
removeRubberBand();
return;
Expand Down

0 comments on commit bee1291

Please sign in to comment.