From: fnargwibble@gmail.com Date: Sat, 21 Jan 2012 14:32:39 +0000 (+0000) Subject: Oops. Fix grid lock when zoomed in or out. X-Git-Tag: v1.0.0~233 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/3bc2349df1b2fbbc9adef9a3263f9a02f90c61e9 Oops. Fix grid lock when zoomed in or out. --- 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;