Mercurial > octave-nkf
diff libgui/graphics/Canvas.cc @ 20075:055ad6fbc910
Don't zoom in for 'Z-' setting and rectangle drag (bug #44437).
* Canvas.cc (canvasMouseReleaseEvent): Check m_mouseMode is ZoomInMode
before zooming.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 07 Apr 2015 18:29:01 -0700 |
parents | f2dea119369e |
children | 908b68a98ba6 |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc Tue Apr 07 16:55:39 2015 -0400 +++ b/libgui/graphics/Canvas.cc Tue Apr 07 18:29:01 2015 -0700 @@ -414,7 +414,7 @@ void Canvas::canvasMouseDoubleClickEvent (QMouseEvent* event) { - // same processing as nornal click, but event type is MouseButtonDblClick + // same processing as normal click, but event type is MouseButtonDblClick canvasMousePressEvent (event); } @@ -571,8 +571,7 @@ { if (event->button () == Qt::LeftButton) { - axes::properties& ap = - Utils::properties<axes> (axesObj); + axes::properties& ap = Utils::properties<axes> (axesObj); autoscale_axes (ap); } @@ -662,7 +661,7 @@ ap.zoom_about_point (zm, p1(0), p1(1), factor); } - else + else if (m_mouseMode == ZoomInMode) { ColumnVector p0 = ap.pixel2coord (m_mouseAnchor.x (), m_mouseAnchor.y ());