Skip to content
Permalink
Browse files

restore zoom out rect

  • Loading branch information
3nids committed Oct 20, 2018
1 parent 5fd6f68 commit f17b1a521900ead7dbc8b6ecdfbbf25369dad125
Showing with 4 additions and 14 deletions.
  1. +0 −4 python/gui/auto_generated/qgsmaptoolzoom.sip.in
  2. +3 −10 src/gui/qgsmaptoolzoom.cpp
  3. +1 −0 src/gui/qgsmaptoolzoom.h
@@ -47,10 +47,6 @@ constructor



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

/************************************************************************
@@ -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();
}
}

@@ -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;
@@ -63,6 +63,7 @@ class GUI_EXPORT QgsMapToolZoom : public QgsMapTool
QCursor mZoomOutCursor;
QCursor mZoomInCursor;

private:
void updateCursor();
};

0 comments on commit f17b1a5

Please sign in to comment.
You can’t perform that action at this time.