mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-08 17:18:10 +08:00
Fix #194 Graph window loops to end if you scroll left past 0
This commit is contained in:
parent
6a6902e57d
commit
e4f00c52da
1 changed files with 9 additions and 3 deletions
|
@ -586,7 +586,7 @@ void Plot::mouseMoveEvent(QMouseEvent *event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plot::keyPressEvent(QKeyEvent *event) {
|
void Plot::keyPressEvent(QKeyEvent *event) {
|
||||||
int offset;
|
uint32_t offset;
|
||||||
|
|
||||||
if (event->modifiers() & Qt::ShiftModifier) {
|
if (event->modifiers() & Qt::ShiftModifier) {
|
||||||
if (PlotGridX)
|
if (PlotGridX)
|
||||||
|
@ -623,9 +623,15 @@ void Plot::keyPressEvent(QKeyEvent *event) {
|
||||||
|
|
||||||
case Qt::Key_Left:
|
case Qt::Key_Left:
|
||||||
if (GraphPixelsPerPoint < 20) {
|
if (GraphPixelsPerPoint < 20) {
|
||||||
GraphStart -= offset;
|
if (GraphStart >= offset) {
|
||||||
|
GraphStart -= offset;
|
||||||
|
} else {
|
||||||
|
GraphStart = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
GraphStart--;
|
if (GraphStart > 0) {
|
||||||
|
GraphStart--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue