traverso-commit
[Top][All Lists]
Advanced

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

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


From: Remon Sijrier
Subject: [Traverso-commit] traverso/src/commands MoveEdge.cpp
Date: Sat, 07 Mar 2009 16:54:27 +0000

CVSROOT:        /sources/traverso
Module name:    traverso
Changes by:     Remon Sijrier <r_sijrier>       09/03/07 16:54:27

Modified files:
        src/commands   : MoveEdge.cpp 

Log message:
        * correctly calculate the 'real' new edge position, so when the old pos 
== new pos do nothing!

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/traverso/src/commands/MoveEdge.cpp?cvsroot=traverso&r1=1.23&r2=1.24

Patches:
Index: MoveEdge.cpp
===================================================================
RCS file: /sources/traverso/traverso/src/commands/MoveEdge.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- MoveEdge.cpp        21 Feb 2008 20:00:47 -0000      1.23
+++ MoveEdge.cpp        7 Mar 2009 16:54:27 -0000       1.24
@@ -1,28 +1,30 @@
 /*
-    Copyright (C) 2005-2007 Remon Sijrier 
+Copyright (C) 2005-2009 Remon Sijrier 
  
-    This file is part of Traverso
+This file is part of Traverso
  
-    Traverso is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
- 
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
+Traverso is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA.
  
 */
 
-#include <libtraversocore.h>
-
 #include "MoveEdge.h"
-#include <ViewPort.h>
+
+#include "AudioClip.h"
+#include "ContextPointer.h"
+#include "Sheet.h"
+#include "SnapList.h"
 #include <SheetView.h>
 #include <AudioClipView.h>
 
@@ -128,7 +130,12 @@
                m_newPos = m_otherEdgePos - (2 * m_sv->timeref_scalefactor);
        }
 
-        return do_action();
+       // use this function to actually set the clip edge
+       do_action();
+       
+       // AudioClip does the calculation and corrects is we wanted to move the 
+       // edge to far. So set m_newPos to the _real_ track end location.
+       m_newPos = m_clip->get_track_end_location();
 }
 
 // eof




reply via email to

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