comparison layer/FlexiNoteLayer.cpp @ 798:6eb0b20c940f tonioni

Merge
author Chris Cannam
date Fri, 13 Jun 2014 17:44:58 +0100
parents 7717751f4407
children d6b79166ae0d
comparison
equal deleted inserted replaced
797:edada332c374 798:6eb0b20c940f
1664 FlexiNoteModel::PointList points = 1664 FlexiNoteModel::PointList points =
1665 m_model->getPoints(s.getStartFrame(), s.getEndFrame()); 1665 m_model->getPoints(s.getStartFrame(), s.getEndFrame());
1666 1666
1667 for (FlexiNoteModel::PointList::iterator i = points.begin(); 1667 for (FlexiNoteModel::PointList::iterator i = points.begin();
1668 i != points.end(); ++i) { 1668 i != points.end(); ++i) {
1669 bool overlap = !(((s.getStartFrame() < i->frame) && (s.getEndFrame() < i->frame)) 1669 bool overlap = !(
1670 || ((s.getStartFrame() > i->frame+i->duration) && (s.getEndFrame() > i->frame+i->duration))); 1670 ((s.getStartFrame() < i->frame) && (s.getEndFrame() < i->frame)) || // selection is left of note
1671 ((s.getStartFrame() > (i->frame+i->duration-1)) && (s.getEndFrame() > (i->frame+i->duration-1))) // selection is right of note
1672 );
1671 if (overlap) { 1673 if (overlap) {
1672 command->deletePoint(*i); 1674 command->deletePoint(*i);
1673 } 1675 }
1674 } 1676 }
1675 1677