- //int startTrack = (start.y() + trackHeight / 2) / trackHeight;
-
- int realTrack = (start.y() + newPos.y() - pos().y()) / trackHeight;
- int proposedTrack = newPos.y() / trackHeight;
-
- int correctedTrack = qMin(realTrack, projectScene()->tracksCount() - (int)(boundingRect().height() + 5) / trackHeight);
- correctedTrack = qMax(correctedTrack, 0);
-
- proposedTrack += (correctedTrack - realTrack);
+ int yOffset = property("y_absolute").toInt() + newPos.y();
+ int proposedTrack = yOffset / trackHeight;