diff options
author | deva <deva> | 2009-11-30 13:35:52 +0000 |
---|---|---|
committer | deva <deva> | 2009-11-30 13:35:52 +0000 |
commit | 68f1b54aace152707f2bb51e07f76ebd879becb1 (patch) | |
tree | d4a6e4798fb35d839641c2c7f43243b7251e04b7 /dgedit/canvas.cc | |
parent | df80c1f82140e57965f38d0a50ad2a843cf60ff5 (diff) |
Samples sorter added.
Diffstat (limited to 'dgedit/canvas.cc')
-rw-r--r-- | dgedit/canvas.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dgedit/canvas.cc b/dgedit/canvas.cc index 23cd96e..36900a3 100644 --- a/dgedit/canvas.cc +++ b/dgedit/canvas.cc @@ -181,6 +181,7 @@ void Canvas::mouseMoveEvent(QMouseEvent *event) if(val > active_selection->to) val = active_selection->to - 1; active_selection->from = val; update(); + emit selectionsChanged(_selections); return; } @@ -189,6 +190,7 @@ void Canvas::mouseMoveEvent(QMouseEvent *event) if(val < active_selection->from) val = active_selection->from + 1; active_selection->to = val; update(); + emit selectionsChanged(_selections); return; } @@ -230,12 +232,14 @@ void Canvas::mousePressEvent(QMouseEvent *event) if(abs(event->x() - mapX(i.value().from)) < 2) { active_selection = &i.value(); selection_is_moving_left = true; + emit activeSelectionChanged(i.value()); return; } if(abs(event->x() - mapX(i.value().to)) < 2) { active_selection = &i.value(); selection_is_moving_right = true; + emit activeSelectionChanged(i.value()); return; } @@ -249,6 +253,7 @@ void Canvas::mousePressEvent(QMouseEvent *event) event->x() < mapX(i.value().to)) { active_selection = &i.value(); update(); + emit activeSelectionChanged(i.value()); return; } @@ -494,6 +499,7 @@ void Canvas::autoCreateSelections() } } update(); + emit selectionsChanged(_selections); } void Canvas::clearSelections() @@ -503,6 +509,7 @@ void Canvas::clearSelections() selection_is_moving_right = false; setCursor(Qt::ArrowCursor); update(); + emit selectionsChanged(_selections); } Selections Canvas::selections() |