mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07: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%
|
// 120+shift => zoom out 10%
|
||||||
const float zoom_offset = 0.1;
|
const float zoom_offset = 0.1;
|
||||||
if (event->modifiers() & Qt::ShiftModifier) {
|
if (event->modifiers() & Qt::ShiftModifier) {
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
int x = event->position().x();
|
int x = event->position().x();
|
||||||
|
#else
|
||||||
|
int x = event->x();
|
||||||
|
#endif
|
||||||
x -= WIDTH_AXES;
|
x -= WIDTH_AXES;
|
||||||
x = (int)(x / GraphPixelsPerPoint);
|
x = (int)(x / GraphPixelsPerPoint);
|
||||||
x += GraphStart;
|
x += GraphStart;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue