Skip to content

Commit

Permalink
restore zoom out rect
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 20, 2018
1 parent 5fd6f68 commit f17b1a5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
4 changes: 0 additions & 4 deletions python/gui/auto_generated/qgsmaptoolzoom.sip.in
Expand Up @@ -47,10 +47,6 @@ constructor



void updateCursor();
%Docstring
Flag to indicate a map canvas drag operation is taking place
%End
};

/************************************************************************
Expand Down
13 changes: 3 additions & 10 deletions src/gui/qgsmaptoolzoom.cpp
Expand Up @@ -65,15 +65,8 @@ void QgsMapToolZoom::canvasMoveEvent( QgsMapMouseEvent *e )
mZoomRect.setBottomRight( e->pos() );
if ( mRubberBand )
{
if ( mZoomOut )
{
mRubberBand->hide();
}
else
{
mRubberBand->setToCanvasRectangle( mZoomRect );
mRubberBand->show();
}
mRubberBand->setToCanvasRectangle( mZoomRect );
mRubberBand->show();
}
}

Expand All @@ -96,7 +89,7 @@ void QgsMapToolZoom::canvasReleaseEvent( QgsMapMouseEvent *e )
// a pen based computer reporting a press, move, and release, all the
// one point.
bool tooShort = ( mZoomRect.topLeft() - mZoomRect.bottomRight() ).manhattanLength() < mMinPixelZoom;
if ( !mDragging || tooShort || mZoomOut )
if ( !mDragging || tooShort )
{
mDragging = false;
delete mRubberBand;
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsmaptoolzoom.h
Expand Up @@ -63,6 +63,7 @@ class GUI_EXPORT QgsMapToolZoom : public QgsMapTool
QCursor mZoomOutCursor;
QCursor mZoomInCursor;

private:
void updateCursor();
};

Expand Down

0 comments on commit f17b1a5

Please sign in to comment.