summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets/canvas.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2011-06-04 20:17:27 +0000
committerRobert Jonsson <spamatica@gmail.com>2011-06-04 20:17:27 +0000
commite33204ce476daafda6dbfda8c9db2d8dce898ef3 (patch)
tree3712b99177592e1c2ab06f24457b4f30a6a20d62 /muse2/muse/widgets/canvas.cpp
parent11a5e9eacf5b967beb11ec71681188e9a520592b (diff)
fixed regression with copying items on canvas with mouse
Diffstat (limited to 'muse2/muse/widgets/canvas.cpp')
-rw-r--r--muse2/muse/widgets/canvas.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/muse2/muse/widgets/canvas.cpp b/muse2/muse/widgets/canvas.cpp
index 18de985b..eb89af1e 100644
--- a/muse2/muse/widgets/canvas.cpp
+++ b/muse2/muse/widgets/canvas.cpp
@@ -504,19 +504,19 @@ void Canvas::viewMousePressEvent(QMouseEvent* event)
// like moving or drawing lasso is performed.
///if (event->stateAfter() & Qt::RightButton) {
if (event->buttons() & Qt::RightButton & ~(event->button())) {
- //printf("viewMousePressEvent special buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button());
- switch (drag) {
- case DRAG_LASSO:
- drag = DRAG_OFF;
- redraw();
- return;
- case DRAG_MOVE:
- drag = DRAG_OFF;
- endMoveItems (start, MOVE_MOVE, 0);
- return;
- default:
- break;
- }
+ //printf("viewMousePressEvent special buttons:%x mods:%x button:%x\n", (int)event->buttons(), (int)keyState, event->button());
+ switch (drag) {
+ case DRAG_LASSO:
+ drag = DRAG_OFF;
+ redraw();
+ return;
+ case DRAG_MOVE:
+ drag = DRAG_OFF;
+ endMoveItems (start, MOVE_MOVE, 0);
+ return;
+ default:
+ break;
+ }
}
// ignore event if (another) button is already active:
@@ -622,13 +622,12 @@ void Canvas::viewMousePressEvent(QMouseEvent* event)
// Changed by T356. Alt is default reserved for moving the whole window in KDE. Changed to Shift-Alt.
// Hmm, nope, shift-alt is also reserved sometimes. Must find a way to bypass,
// why make user turn off setting? Left alone for now...
- if (ctrl && !shift)
+ if (ctrl)
drag = DRAG_COPY_START;
else if (alt) {
drag = DRAG_CLONE_START;
}
else if (shift) { //Select all on the same pitch (e.g. same y-value)
- if (!ctrl)
deselectAll();
for (iCItem i = items.begin(); i != items.end(); ++i) {
if (i->second->y() == curItem->y() )
@@ -987,7 +986,7 @@ void Canvas::viewMouseMoveEvent(QMouseEvent* event)
case DRAG_CLONE_START:
if (!moving)
break;
- if (keyState & Qt::ControlModifier) {
+ if (keyState & Qt::ShiftModifier) {
if (ax > ay) {
if (drag == DRAG_MOVE_START)
drag = DRAGX_MOVE;