aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2015-09-01 17:09:33 -0300
committerSamuel Fadel <samuelfadel@gmail.com>2015-09-01 17:09:33 -0300
commitf405ac30db93ed9f2adb739c3c09b2ce9369fee6 (patch)
tree70734fc2c7c643950396133ceb37889f21313dab
parent04e48cd798a28ad8df3233fa46b185d02d2d3f96 (diff)
Changed mouse interaction to use keyboard modifiers in order to support.
-rw-r--r--scatterplot.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scatterplot.cpp b/scatterplot.cpp
index a121304..c43b625 100644
--- a/scatterplot.cpp
+++ b/scatterplot.cpp
@@ -223,7 +223,7 @@ void Scatterplot::mousePressEvent(QMouseEvent *event)
switch (m_currentInteractionState) {
case INTERACTION_NONE:
case INTERACTION_SELECTED:
- m_currentInteractionState = (event->button() == Qt::MiddleButton) ? INTERACTION_MOVING
+ m_currentInteractionState = (event->modifiers() == Qt::AltModifier) ? INTERACTION_MOVING
: INTERACTION_SELECTING;
m_dragOriginPos = event->localPos();
m_dragCurrentPos = m_dragOriginPos;
@@ -261,7 +261,7 @@ void Scatterplot::mouseReleaseEvent(QMouseEvent *event)
switch (m_currentInteractionState) {
case INTERACTION_SELECTING:
- mergeSelection = (event->button() == Qt::RightButton);
+ mergeSelection = (event->modifiers() == Qt::ControlModifier);
m_currentInteractionState = selectGlyphs(mergeSelection) ? INTERACTION_SELECTED
: INTERACTION_NONE;
update();