summaryrefslogtreecommitdiff
path: root/dgedit/canvastoolselections.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-05-09 12:04:49 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-05-09 12:04:49 +0200
commit14041f774fc25ea1372587c344c42cdc57172155 (patch)
treec953eb1b7e0b5ef771950665de02c44c42ab8206 /dgedit/canvastoolselections.cc
parenta4d73c0cb2321bd61bd31d2922ae469389e5825e (diff)
Click sorted samples hilight the corresponding canvas selection.
Diffstat (limited to 'dgedit/canvastoolselections.cc')
-rw-r--r--dgedit/canvastoolselections.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/dgedit/canvastoolselections.cc b/dgedit/canvastoolselections.cc
index 5188cb0..5868b1f 100644
--- a/dgedit/canvastoolselections.cc
+++ b/dgedit/canvastoolselections.cc
@@ -53,6 +53,19 @@ CanvasToolSelections::CanvasToolSelections(Canvas *c)
}
+void CanvasToolSelections::setActiveSelection(Selection s)
+{
+ QMap<int, Selection>::iterator i = _selections.begin();
+ while(i != _selections.end()) {
+ if(s.from == i.value().from &&
+ s.to == i.value().to) active_selection = &i.value();
+ i++;
+ }
+
+ canvas->update();
+ emit activeSelectionChanged(s);
+}
+
bool CanvasToolSelections::mouseMoveEvent(QMouseEvent *event)
{
if(selection_is_moving_left) {