# HG changeset patch # User Chris Cannam # Date 1402677898 -3600 # Node ID 6eb0b20c940fe3475c3a847b10225ae720c7e958 # Parent edada332c374cbb70f2ec94b6abc7b0a3257ae2f# Parent 7717751f44070920714ed7885b409332556944db Merge diff -r edada332c374 -r 6eb0b20c940f layer/FlexiNoteLayer.cpp --- a/layer/FlexiNoteLayer.cpp Fri Jun 13 17:39:01 2014 +0100 +++ b/layer/FlexiNoteLayer.cpp Fri Jun 13 17:44:58 2014 +0100 @@ -1666,8 +1666,10 @@ for (FlexiNoteModel::PointList::iterator i = points.begin(); i != points.end(); ++i) { - bool overlap = !(((s.getStartFrame() < i->frame) && (s.getEndFrame() < i->frame)) - || ((s.getStartFrame() > i->frame+i->duration) && (s.getEndFrame() > i->frame+i->duration))); + bool overlap = !( + ((s.getStartFrame() < i->frame) && (s.getEndFrame() < i->frame)) || // selection is left of note + ((s.getStartFrame() > (i->frame+i->duration-1)) && (s.getEndFrame() > (i->frame+i->duration-1))) // selection is right of note + ); if (overlap) { command->deletePoint(*i); }