diff layer/TimeInstantLayer.cpp @ 944:78c152e4db95

Merge from branch tonioni
author Chris Cannam
date Mon, 20 Apr 2015 09:12:17 +0100
parents 251dd0abc7b7
children 94e4952a6774 3871dffc31bd
line wrap: on
line diff
--- a/layer/TimeInstantLayer.cpp	Thu Jan 15 10:42:00 2015 +0000
+++ b/layer/TimeInstantLayer.cpp	Mon Apr 20 09:12:17 2015 +0100
@@ -201,7 +201,7 @@
 }
 
 QString
-TimeInstantLayer::getLabelPreceding(int frame) const
+TimeInstantLayer::getLabelPreceding(sv_frame_t frame) const
 {
     if (!m_model) return "";
     SparseOneDimensionalModel::PointList points = m_model->getPreviousPoints(frame);
@@ -249,7 +249,7 @@
 }
 
 bool
-TimeInstantLayer::snapToFeatureFrame(View *v, int &frame,
+TimeInstantLayer::snapToFeatureFrame(View *v, sv_frame_t &frame,
 				     int &resolution,
 				     SnapType snap) const
 {
@@ -269,7 +269,7 @@
     }    
 
     points = m_model->getPoints(frame, frame);
-    int snapped = frame;
+    sv_frame_t snapped = frame;
     bool found = false;
 
     for (SparseOneDimensionalModel::PointList::const_iterator i = points.begin();
@@ -666,7 +666,7 @@
 }
 
 void
-TimeInstantLayer::moveSelection(Selection s, int newStartFrame)
+TimeInstantLayer::moveSelection(Selection s, sv_frame_t newStartFrame)
 {
     if (!m_model) return;
 
@@ -712,9 +712,9 @@
 
 	if (s.contains(i->frame)) {
 
-	    double target = i->frame;
-	    target = newSize.getStartFrame() + 
-		double(target - s.getStartFrame()) * ratio;
+	    double target = double(i->frame);
+	    target = double(newSize.getStartFrame()) +
+		target - double(s.getStartFrame()) * ratio;
 
 	    SparseOneDimensionalModel::Point newPoint(*i);
 	    newPoint.frame = lrint(target);
@@ -765,7 +765,7 @@
 }
 
 bool
-TimeInstantLayer::paste(View *v, const Clipboard &from, int frameOffset, bool)
+TimeInstantLayer::paste(View *v, const Clipboard &from, sv_frame_t frameOffset, bool)
 {
     if (!m_model) return false;
 
@@ -798,7 +798,7 @@
         
         if (!i->haveFrame()) continue;
 
-        int frame = 0;
+        sv_frame_t frame = 0;
 
         if (!realign) {