diff layer/FlexiNoteLayer.cpp @ 799:d6b79166ae0d tonioni

fixed deleteSelectionInclusive to not delete adjacent notes
author matthiasm
date Mon, 16 Jun 2014 11:44:14 +0100
parents 7717751f4407
children 40c6c9344ff6
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp	Fri Jun 13 17:44:58 2014 +0100
+++ b/layer/FlexiNoteLayer.cpp	Mon Jun 16 11:44:14 2014 +0100
@@ -1667,8 +1667,8 @@
     for (FlexiNoteModel::PointList::iterator i = points.begin();
          i != points.end(); ++i) {
         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
+            ((s.getStartFrame() <= i->frame) && (s.getEndFrame() <= i->frame)) || // selection is left of note
+            ((s.getStartFrame() >= (i->frame+i->duration)) && (s.getEndFrame() >= (i->frame+i->duration))) // selection is right of note
             );
         if (overlap) {
             command->deletePoint(*i);