From 14041f774fc25ea1372587c344c42cdc57172155 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 May 2013 12:04:49 +0200 Subject: Click sorted samples hilight the corresponding canvas selection. --- dgedit/canvastoolselections.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dgedit/canvastoolselections.cc') 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::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) { -- cgit v1.2.3