From 9d70bad7aa74ffed9b9cee6b77d17497cc6615bc Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 17 Nov 2024 01:10:32 -0500 Subject: [PATCH] Tint/dim port only when left-dragging. --- src/app/PortWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/PortWidget.cpp b/src/app/PortWidget.cpp index bd5c7c10..e12d84d1 100644 --- a/src/app/PortWidget.cpp +++ b/src/app/PortWidget.cpp @@ -374,8 +374,9 @@ void PortWidget::step() { void PortWidget::draw(const DrawArgs& args) { + // Check if left-dragging a PortWidget PortWidget* draggedPw = dynamic_cast(APP->event->getDraggedWidget()); - if (draggedPw) { + if (draggedPw && APP->event->dragButton == GLFW_MOUSE_BUTTON_LEFT) { if (draggedPw->internal->draggedType != type) { // Dim the PortWidget if the active cable cannot plug into this PortWidget nvgTint(args.vg, nvgRGBf(0.33, 0.33, 0.33));