From 2a4b2d6544e1046e0f97a41af17369a8ecc8c14b Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Mon, 29 Aug 2011 10:10:46 +1000 Subject: [PATCH] Limit minimum zoom level --- Graphs/gGraphView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Graphs/gGraphView.cpp b/Graphs/gGraphView.cpp index f37e4ff3..403ff7fb 100644 --- a/Graphs/gGraphView.cpp +++ b/Graphs/gGraphView.cpp @@ -141,6 +141,7 @@ EventDataType LayerGroup::Maxy() } +const double zoom_hard_limit=500.0; gGraph::gGraph(gGraphView *graphview,QString title,int height,short group) : m_graphview(graphview), @@ -489,6 +490,7 @@ void gGraph::mouseReleaseEvent(QMouseEvent * event) if (event->modifiers() & Qt::ControlModifier) zoom/=1.5; } xx*=zoom; + if (xxqq) xx=qq; } double j1=xmult*x; @@ -576,7 +578,7 @@ void gGraph::ZoomX(double mult,int origin_px) double q=span*mult; if (q>hardspan) q=hardspan; - if (q