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 commands...


From: Ben Levitt
Subject: [Traverso-commit] traverso/src commands/PlayHeadMove.cpp commands...
Date: Wed, 30 May 2007 16:14:47 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Ben Levitt <benjie>     07/05/30 16:14:47

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

Log message:
        fix auto-scroll distance, fix dragging playhead vertically

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/PlayHeadMove.cpp?cvsroot=traverso&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/PlayHeadMove.h?cvsroot=traverso&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/traverso/src/traverso/songcanvas/Cursors.cpp?cvsroot=traverso&r1=1.21&r2=1.22

Patches:
Index: commands/PlayHeadMove.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/PlayHeadMove.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- commands/PlayHeadMove.cpp   30 May 2007 06:05:06 -0000      1.10
+++ commands/PlayHeadMove.cpp   30 May 2007 16:14:46 -0000      1.11
@@ -87,14 +87,16 @@
 int PlayHeadMove::jog()
 {
        int x = cpointer().scene_x();
+       int y = cpointer().scene_y();
        if (x < 0) {
                x = 0;
        }
-       if (x == m_newXPos) {
+       if (x == m_newXPos && y == m_newYPos) {
                return 0;
        }
        
        m_newXPos = x;
+       m_newYPos = y;
        
        m_cursor->setPos(x, 0);
        
@@ -107,7 +109,7 @@
        cpointer().get_viewport()->set_holdcursor_text(frame_to_text(newpos, 
m_song->get_rate(), m_sv->scalefactor));
        // Hmm, the alignment of the holdcursor isn't in the center, so we have 
to 
        // substract half the width of it to make it appear centered... :-(
-       
cpointer().get_viewport()->set_holdcursor_pos(QPoint(cpointer().scene_x() - 16, 
cpointer().scene_y() - 16));
+       cpointer().get_viewport()->set_holdcursor_pos(QPoint(x - 16, y - 16));
        
        return 1;
 }

Index: commands/PlayHeadMove.h
===================================================================
RCS file: /sources/traverso/traverso/src/commands/PlayHeadMove.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- commands/PlayHeadMove.h     15 May 2007 11:25:42 -0000      1.3
+++ commands/PlayHeadMove.h     30 May 2007 16:14:47 -0000      1.4
@@ -48,6 +48,7 @@
        bool            m_resync;
        int             m_origXPos;
        int             m_newXPos;
+       int             m_newYPos;
 };
 
 #endif

Index: traverso/songcanvas/Cursors.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/traverso/songcanvas/Cursors.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- traverso/songcanvas/Cursors.cpp     30 May 2007 06:05:06 -0000      1.21
+++ traverso/songcanvas/Cursors.cpp     30 May 2007 16:14:47 -0000      1.22
@@ -184,7 +184,9 @@
        // Due the playhead moves as well during the animation, we have to 
        // compensate for this, by adding it's delta x to the animation 
        // 'scroll' position
-       m_animationScrollPosition += (int)(value/16 + deltaX);
+       //
+       // And with the duration changed to 800, 9 is a good division factor
+       m_animationScrollPosition += (int)(value/9 + deltaX);
        
        if (newPos != pos()) {
                setPos(newPos);




reply via email to

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