This commit is contained in:
iceman1001 committed 2024-05-14 10:04:28 +02:00
1 parent 72a11cfd89
commit 42f0699c78
17 files changed
+256 -167

No files matched your search

+4 -4
View File
@@ -1270,14 +1270,14 @@ void Plot::mouseMoveEvent(QMouseEvent *event) {
int x = event->x();
//Only run the marker place code if a mouse button is pressed
if((event->buttons() & Qt::LeftButton) || (event->buttons() & Qt::RightButton)) {
if ((event->buttons() & Qt::LeftButton) || (event->buttons() & Qt::RightButton)) {
x -= WIDTH_AXES;
x = (int)(x / g_GraphPixelsPerPoint);
x += g_GraphStart;
if(x > (int)g_GraphTraceLen) x = 0; // Set to 0 if the number is stupidly big
else if(x < (int)g_GraphStart) x = (int)g_GraphStart; // Bounds checking for the start of the Graph Window
else if(x > (int)g_GraphStop) x = (int)g_GraphStop; // Bounds checking for the end of the Graph Window
if (x > (int)g_GraphTraceLen) x = 0; // Set to 0 if the number is stupidly big
else if (x < (int)g_GraphStart) x = (int)g_GraphStart; // Bounds checking for the start of the Graph Window
else if (x > (int)g_GraphStop) x = (int)g_GraphStop; // Bounds checking for the end of the Graph Window
if ((event->buttons() & Qt::LeftButton)) { // True for left click, false otherwise
g_MarkerA.pos = x;