From b2e18b529b3b93c61859bce54e42c510c91b704b Mon Sep 17 00:00:00 2001 From: Sam Gondelman Date: Mon, 27 Jul 2015 10:09:59 -0700 Subject: [PATCH] toggle overlay with mouse middle click, controller 'right click' --- interface/src/Application.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 1e48991969..4f53b85f83 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1707,10 +1707,15 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { sendEvent(this, &actionEvent); } else if (event->button() == Qt::RightButton) { - // right click items here + // "right click" on controllers to toggle the overlay + if (deviceID > 0) { + _overlayConductor.setEnabled(!_overlayConductor.getEnabled()); + } } else if (event->button() == Qt::MiddleButton) { - // toggle the overlay - _overlayConductor.setEnabled(!_overlayConductor.getEnabled()); + // mouse middle click to toggle the overlay + if (deviceID == 0) { + _overlayConductor.setEnabled(!_overlayConductor.getEnabled()); + } } } }