summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets/canvas.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-06-06 12:45:57 +0000
committerFlorian Jung <flo@windfisch.org>2011-06-06 12:45:57 +0000
commitd9380293e430d47e03ef94a9914e200c297bc376 (patch)
treeb603a9b028cb1419d634c75b8fce09583b58fa58 /muse2/muse/widgets/canvas.cpp
parent5e9533d5620f312b3727122c1680d97cf6ca2ff1 (diff)
parente33204ce476daafda6dbfda8c9db2d8dce898ef3 (diff)
merged with current trunk and removed (unused) support for disabling the keymap
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 3e9cb46e..650b10b7 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:
@@ -619,13 +619,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() )
@@ -984,7 +983,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;