summaryrefslogtreecommitdiff
path: root/dgedit/canvastoollisten.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-04-15 14:14:52 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-04-15 14:14:52 +0200
commit1cabb60b318fd831458f937b240b207c21a28ceb (patch)
treecf915e291f2301049ef912bf2ef0863a0cc4730c /dgedit/canvastoollisten.cc
parent4aa5b796ba7186892d14e20226d6cef942d0c60d (diff)
Make CanvasToolListen work again with offsets using the mouse. Clean up Player code some more.
Diffstat (limited to 'dgedit/canvastoollisten.cc')
-rw-r--r--dgedit/canvastoollisten.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/dgedit/canvastoollisten.cc b/dgedit/canvastoollisten.cc
index f842235..bd16b15 100644
--- a/dgedit/canvastoollisten.cc
+++ b/dgedit/canvastoollisten.cc
@@ -38,6 +38,7 @@ CanvasToolListen::CanvasToolListen(Canvas *c, Player &p)
bool CanvasToolListen::mousePressEvent(QMouseEvent *event)
{
if(!isActive()) return false;
+ player.setPosition(canvas->unmapX(event->x()));
player.playing = true;
canvas->update();
connect(&player, SIGNAL(positionUpdate(size_t)), this, SLOT(update(size_t)));