mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-23 15:47:42 +08:00
Fix for both QT4 and QT5
This commit is contained in:
parent
8bbda87956
commit
6a805eaf33
1 changed files with 4 additions and 0 deletions
|
@ -686,7 +686,11 @@ void Plot::wheelEvent(QWheelEvent *event) {
|
|||
// 120+shift => zoom out 10%
|
||||
const float zoom_offset = 0.1;
|
||||
if (event->modifiers() & Qt::ShiftModifier) {
|
||||
#if QT_VERSION >= 0x050000
|
||||
int x = event->position().x();
|
||||
#else
|
||||
int x = event->x();
|
||||
#endif
|
||||
x -= WIDTH_AXES;
|
||||
x = (int)(x / GraphPixelsPerPoint);
|
||||
x += GraphStart;
|
||||
|
|
Loading…
Reference in a new issue