Skip to content
Permalink
Browse files
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.
@@ -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;
@@ -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;

0 comments on commit bee1291

Please sign in to comment.