comparison layer/TimeValueLayer.cpp @ 371:098c568dc76b

* Fix #1894369 1.2pre5 crashes on copying data
author Chris Cannam
date Fri, 15 Feb 2008 15:15:29 +0000
parents d58701996fae
children 67f82da3d29c
comparison
equal deleted inserted replaced
370:8ebc2ce2a210 371:098c568dc76b
1336 1336
1337 prevSelection = selection; 1337 prevSelection = selection;
1338 } 1338 }
1339 } 1339 }
1340 1340
1341 static SparseTimeValueModel::Point prevPoint(0); 1341 SparseTimeValueModel::Point prevPoint = 0;
1342 1342
1343 for (Clipboard::PointList::const_iterator i = points.begin(); 1343 for (Clipboard::PointList::const_iterator i = points.begin();
1344 i != points.end(); ++i) { 1344 i != points.end(); ++i) {
1345 1345
1346 if (!i->haveFrame()) continue; 1346 if (!i->haveFrame()) continue;
1371 1371
1372 if (i->haveValue()) { 1372 if (i->haveValue()) {
1373 newPoint.value = i->getValue(); 1373 newPoint.value = i->getValue();
1374 } else { 1374 } else {
1375 labeller.setValue<SparseTimeValueModel::Point> 1375 labeller.setValue<SparseTimeValueModel::Point>
1376 (newPoint, i == points.begin() ? 0 : &prevPoint); 1376 (newPoint, (i == points.begin()) ? 0 : &prevPoint);
1377 } 1377 }
1378 1378
1379 prevPoint = newPoint; 1379 prevPoint = newPoint;
1380 command->addPoint(newPoint); 1380 command->addPoint(newPoint);
1381 } 1381 }