]> ruin.nu Git - moosique.git/blobdiff - MooTrackView.java
Fixed the note element length.
[moosique.git] / MooTrackView.java
index 5efb00238f5366180076fcc8b65a48d83b431a70..dbbcc9217096982b4fb862de37fab6ae8660c836 100644 (file)
@@ -93,8 +93,8 @@ public class MooTrackView extends JPanel implements ActionListener {
                                        // Moves the note element to the appropriate place.
                                        x = insets.left;
                                        y = insets.top + (int)(mn.getTick() / 24) * NOTE_HEIGHT;
-                                       height = NOTE_HEIGHT;
-                                       // height = (mn.getDuration() / 24) * NOTE_HEIGHT;
+                                       height = (mn.getDuration() / 24) * NOTE_HEIGHT;
+                                       if (height == 0) height = NOTE_HEIGHT;
                                        Rectangle r = new Rectangle(x, y, NOTE_WIDTH, height);
                                        while(isOccupied(r)) r.translate(NOTE_WIDTH, 0);
                                        elem.setBounds(r);