Mercurial > hg > svgui
comparison layer/TimeInstantLayer.cpp @ 248:28c8e8e3c537
* Fix many compile warnings, remove some debug output
author | Chris Cannam |
---|---|
date | Mon, 30 Apr 2007 13:36:23 +0000 |
parents | 34bbbcb3c01f |
children | e175ade2d6b0 |
comparison
equal
deleted
inserted
replaced
247:0e9f59f991aa | 248:28c8e8e3c537 |
---|---|
209 | 209 |
210 SparseOneDimensionalModel::PointList usePoints = prevPoints; | 210 SparseOneDimensionalModel::PointList usePoints = prevPoints; |
211 | 211 |
212 if (prevPoints.empty()) { | 212 if (prevPoints.empty()) { |
213 usePoints = nextPoints; | 213 usePoints = nextPoints; |
214 } else if (prevPoints.begin()->frame < v->getStartFrame() && | 214 } else if (long(prevPoints.begin()->frame) < v->getStartFrame() && |
215 !(nextPoints.begin()->frame > v->getEndFrame())) { | 215 !(nextPoints.begin()->frame > v->getEndFrame())) { |
216 usePoints = nextPoints; | 216 usePoints = nextPoints; |
217 } else if (nextPoints.begin()->frame - frame < | 217 } else if (nextPoints.begin()->frame - frame < |
218 frame - prevPoints.begin()->frame) { | 218 frame - prevPoints.begin()->frame) { |
219 usePoints = nextPoints; | 219 usePoints = nextPoints; |
517 m_editingPoint.frame = frame; | 517 m_editingPoint.frame = frame; |
518 m_editingCommand->addPoint(m_editingPoint); | 518 m_editingCommand->addPoint(m_editingPoint); |
519 } | 519 } |
520 | 520 |
521 void | 521 void |
522 TimeInstantLayer::drawEnd(View *v, QMouseEvent *e) | 522 TimeInstantLayer::drawEnd(View *, QMouseEvent *e) |
523 { | 523 { |
524 std::cerr << "TimeInstantLayer::drawEnd(" << e->x() << ")" << std::endl; | 524 std::cerr << "TimeInstantLayer::drawEnd(" << e->x() << ")" << std::endl; |
525 if (!m_model || !m_editing) return; | 525 if (!m_model || !m_editing) return; |
526 QString newName = tr("Add Point at %1 s") | 526 QString newName = tr("Add Point at %1 s") |
527 .arg(RealTime::frame2RealTime(m_editingPoint.frame, | 527 .arg(RealTime::frame2RealTime(m_editingPoint.frame, |
573 m_editingPoint.frame = frame; | 573 m_editingPoint.frame = frame; |
574 m_editingCommand->addPoint(m_editingPoint); | 574 m_editingCommand->addPoint(m_editingPoint); |
575 } | 575 } |
576 | 576 |
577 void | 577 void |
578 TimeInstantLayer::editEnd(View *v, QMouseEvent *e) | 578 TimeInstantLayer::editEnd(View *, QMouseEvent *e) |
579 { | 579 { |
580 std::cerr << "TimeInstantLayer::editEnd(" << e->x() << ")" << std::endl; | 580 std::cerr << "TimeInstantLayer::editEnd(" << e->x() << ")" << std::endl; |
581 if (!m_model || !m_editing) return; | 581 if (!m_model || !m_editing) return; |
582 if (m_editingCommand) { | 582 if (m_editingCommand) { |
583 QString newName = tr("Move Point to %1 s") | 583 QString newName = tr("Move Point to %1 s") |
722 } | 722 } |
723 } | 723 } |
724 } | 724 } |
725 | 725 |
726 bool | 726 bool |
727 TimeInstantLayer::paste(const Clipboard &from, int frameOffset, bool interactive) | 727 TimeInstantLayer::paste(const Clipboard &from, int frameOffset, bool) |
728 { | 728 { |
729 if (!m_model) return false; | 729 if (!m_model) return false; |
730 | 730 |
731 const Clipboard::PointList &points = from.getPoints(); | 731 const Clipboard::PointList &points = from.getPoints(); |
732 | 732 |