summaryrefslogtreecommitdiff
path: root/dgedit/canvastoolselections.cc
diff options
context:
space:
mode:
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) {