From 17f4185ae7d0504e92aacc666d19cf42ee08ad67 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 17 Jul 2011 17:19:31 +1000 Subject: [PATCH] Event Flags now zooms to detail when fully expanded --- Graphs/graphwindow.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Graphs/graphwindow.cpp b/Graphs/graphwindow.cpp index 2827209e..a3a6debf 100644 --- a/Graphs/graphwindow.cpp +++ b/Graphs/graphwindow.cpp @@ -699,19 +699,20 @@ void gGraphWindow::OnMouseLeftRelease(QMouseEvent * event) x-=GetLeftMargin(); double rx=rmax_x-rmin_x; double mx=max_x-min_x; - if (mxrmax_x) { - qx=rmax_x-mx; - } - SetXBounds(qx,qx+mx); - did_draw=true; + double qx=(rx/width)*double(x); + if (mx>=rx) { + mx=1.0/(24.0*15.0); } + qx+=rmin_x; + qx-=mx/2.0; + if (qxrmax_x) { + qx=rmax_x-mx; + } + SetXBounds(qx,qx+mx); + did_draw=true; } else { int xp=x; //xp=0;