From 3bc2349df1b2fbbc9adef9a3263f9a02f90c61e9 Mon Sep 17 00:00:00 2001 From: "fnargwibble@gmail.com" Date: Sat, 21 Jan 2012 14:32:39 +0000 Subject: [PATCH] Oops. Fix grid lock when zoomed in or out. --- client/proxguiqt.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/proxguiqt.cpp b/client/proxguiqt.cpp index 2c689419..4e57fecc 100644 --- a/client/proxguiqt.cpp +++ b/client/proxguiqt.cpp @@ -134,7 +134,7 @@ void ProxWidget::paintEvent(QPaintEvent *event) // plot X and Y grid lines int i; if ((PlotGridX > 0) && ((PlotGridX * GraphPixelsPerPoint) > 1)) { - for(i = 40 + GridOffset; i < r.right(); i += (int)(PlotGridX * GraphPixelsPerPoint)) { + for(i = 40 + (GridOffset * GraphPixelsPerPoint); i < r.right(); i += (int)(PlotGridX * GraphPixelsPerPoint)) { //SelectObject(hdc, GreyPenLite); //MoveToEx(hdc, r.left + i, r.top, NULL); //LineTo(hdc, r.left + i, r.bottom); @@ -330,9 +330,9 @@ void ProxWidget::keyPressEvent(QKeyEvent *event) GridOffset -= (int)(20 / GraphPixelsPerPoint); GraphStart += (int)(20 / GraphPixelsPerPoint); } else { - GraphStart++; if (GridLocked && GraphStart < startMax) GridOffset--; + GraphStart++; } if(GridOffset < 0) GridOffset += PlotGridX; @@ -346,9 +346,9 @@ void ProxWidget::keyPressEvent(QKeyEvent *event) GridOffset += (int)(20 / GraphPixelsPerPoint); GraphStart -= (int)(20 / GraphPixelsPerPoint); } else { - GraphStart--; if (GridLocked && GraphStart > 0) GridOffset++; + GraphStart--; } if (PlotGridX) GridOffset %= PlotGridX; -- 2.39.5