traverso-commit
[Top][All Lists]
Advanced

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

[Traverso-commit] traverso/src/core SnapList.cpp


From: Ben Levitt
Subject: [Traverso-commit] traverso/src/core SnapList.cpp
Date: Fri, 04 May 2007 21:28:06 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Ben Levitt <benjie>     07/05/04 21:28:06

Modified files:
        src/core       : SnapList.cpp 

Log message:
        Fix another snap bug: 2 snap points near eachother both should work 
correctly now

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/core/SnapList.cpp?cvsroot=traverso&r1=1.13&r2=1.14

Patches:
Index: SnapList.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/core/SnapList.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- SnapList.cpp        6 Apr 2007 10:01:41 -0000       1.13
+++ SnapList.cpp        4 May 2007 21:28:06 -0000       1.14
@@ -17,7 +17,7 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
 
-$Id: SnapList.cpp,v 1.13 2007/04/06 10:01:41 r_sijrier Exp $
+$Id: SnapList.cpp,v 1.14 2007/05/04 21:28:06 benjie Exp $
 */
 
 #include "SnapList.h"
@@ -137,9 +137,9 @@
                // if yes, reduce SNAP_WIDTH to keep the border in the middle
                int ls = -SNAP_WIDTH;
 
-               if (i > 0) {
-                       if ( (xposList.at(lastIndex) - xposList.at(i)) > (2 * 
ls) ) {
-                               ls = ((xposList.at(lastIndex) - xposList.at(i)) 
/ m_scalefactor) / 2;
+               if (lastIndex > -1) {
+                       if ( (xposList.at(i) - lastVal) < (2 * SNAP_WIDTH * 
m_scalefactor) ) {
+                               ls = - (int) ((xposList.at(i) / m_scalefactor - 
lastVal / m_scalefactor) / 2);
                        }
                }
 




reply via email to

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