Mercurial > hg > svgui
comparison layer/FlexiNoteLayer.cpp @ 796:7717751f4407 tonioni
fixed selection by note move to not include the next note on the right
author | matthiasm |
---|---|
date | Fri, 13 Jun 2014 16:50:17 +0100 |
parents | 54efa0a4f728 |
children | d6b79166ae0d |
comparison
equal
deleted
inserted
replaced
795:54efa0a4f728 | 796:7717751f4407 |
---|---|
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 |