From e6506cd55fc3a5e734ac1c68a4b3d9f3335caae6 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Sun, 18 Sep 2022 21:00:44 +0100 Subject: [PATCH] Add storing button config --- shuttlesetup.cpp | 24 +++++---- shuttlesetup.h | 3 +- usbcontroller.cpp | 69 +++++++++--------------- usbcontroller.h | 13 +++-- wfmain.cpp | 130 +++++++++++++++++++++++++++++++++++++--------- wfmain.h | 4 +- 6 files changed, 155 insertions(+), 88 deletions(-) diff --git a/shuttlesetup.cpp b/shuttlesetup.cpp index 10ae91f..28d01e5 100644 --- a/shuttlesetup.cpp +++ b/shuttlesetup.cpp @@ -35,7 +35,7 @@ void shuttleSetup::mousePressed(QPoint p) bool found = false; for (BUTTON& b : *buttons) { - if (b.pos.contains(p)) + if (b.dev == currentDevice && b.pos.contains(p)) { found = true; currentButton = &b; @@ -144,16 +144,18 @@ void shuttleSetup::newDevice(unsigned char devType, QVector