]> ruin.nu Git - moosique.git/blobdiff - MooTrackView.java
no message
[moosique.git] / MooTrackView.java
index 873e2d80191b575d080e91286dd22ed06f567c5d..cb22b42def09d6aa15a1223891a317fc5df0e729 100644 (file)
@@ -134,8 +134,8 @@ public class MooTrackView extends JPanel {
                x = insets.left;
                if (quantizeRecording) {
                        // Snap to nearest sixteenth
-                       y = insets.top + (int)((mn.getTick() * NOTE_HEIGHT) / ticksPerSixteenth);
-                       height = (mn.getDuration() * NOTE_HEIGHT) / ticksPerSixteenth;
+                       y = insets.top + Math.round(mn.getTick() / ticksPerSixteenth) * NOTE_HEIGHT;
+                       height = (mn.getDuration() / ticksPerSixteenth) * NOTE_HEIGHT;
                } else {
                        y = insets.top + (int)((mn.getTick() * NOTE_HEIGHT) / ticksPerSixteenth);
                        height = (mn.getDuration() * NOTE_HEIGHT) / ticksPerSixteenth;