traverso-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Traverso-commit] traverso/src commands/PlayHeadMove.cpp traverso...


From: Ben Levitt
Subject: [Traverso-commit] traverso/src commands/PlayHeadMove.cpp traverso...
Date: Fri, 25 May 2007 06:38:45 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Ben Levitt <benjie>     07/05/25 06:38:45

Modified files:
        src/commands   : PlayHeadMove.cpp 
        src/traverso/songcanvas: SongView.cpp SongView.h 

Log message:
        add touch_play_cursor() slot, fix PlayHeadMove bug

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/PlayHeadMove.cpp?cvsroot=traverso&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongView.cpp?cvsroot=traverso&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/SongView.h?cvsroot=traverso&r1=1.26&r2=1.27

Patches:
Index: commands/PlayHeadMove.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/PlayHeadMove.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- commands/PlayHeadMove.cpp   23 May 2007 05:51:08 -0000      1.8
+++ commands/PlayHeadMove.cpp   25 May 2007 06:38:45 -0000      1.9
@@ -45,7 +45,7 @@
 
        // When SyncDuringDrag is true, don't seek in finish_hold()
        // since that causes another audio glitch.
-       if (!m_resync) {
+       if (!(m_resync && m_song->is_transporting())) {
                // if the song is transporting, the seek action will cause 
                // the playcursor to be moved to the correct location.
                // Until then hide it, it will be shown again when the seek is 
finished!

Index: traverso/songcanvas/SongView.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongView.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- traverso/songcanvas/SongView.cpp    25 May 2007 04:25:53 -0000      1.61
+++ traverso/songcanvas/SongView.cpp    25 May 2007 06:38:45 -0000      1.62
@@ -489,6 +489,16 @@
        return 0;
 }
 
+Command * SongView::touch_play_cursor( )
+{
+       QPointF point = 
m_clipsViewPort->mapToScene(QPoint(cpointer().on_first_input_event_x(), 
cpointer().on_first_input_event_y()));
+       m_playCursor->setPos(point.x(), 0);
+       m_song->set_transport_pos( (nframes_t) (point.x() * scalefactor));
+       m_playCursor->show();
+
+       return 0;
+}
+
 Command * SongView::play_cursor_move( )
 {
        return new PlayHeadMove(m_playCursor, this);

Index: traverso/songcanvas/SongView.h
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/SongView.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- traverso/songcanvas/SongView.h      23 May 2007 12:37:06 -0000      1.26
+++ traverso/songcanvas/SongView.h      25 May 2007 06:38:45 -0000      1.27
@@ -40,7 +40,8 @@
 class SongView : public ViewItem
 {
         Q_OBJECT
-       Q_CLASSINFO("touch", tr("Touch"))
+       Q_CLASSINFO("touch", tr("Set Work Cursor"))
+       Q_CLASSINFO("touch_play_cursor", tr("Set Play Cursor"))
        Q_CLASSINFO("hzoom_out", tr("Horizontal Out"))
        Q_CLASSINFO("hzoom_in", tr("Horizontal In"))
        Q_CLASSINFO("vzoom_out", tr("Vertical Out"))
@@ -123,6 +124,7 @@
        void follow_play_head();
 
        Command* touch();
+       Command* touch_play_cursor();
         Command* hzoom_out();
         Command* hzoom_in();
         Command* vzoom_out();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]