X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooNoteElement.java;h=e93eb298ace082ede63be2c0dafd84936f407a08;hp=1729f4aeeed79d06196fc4bb2a504de3e208b1c0;hb=ce9a16d679f2058454af367e972888ba8e2c34c0;hpb=89d0bdd2f8289ae3f3ebc0762f860948f23110ca diff --git a/MooNoteElement.java b/MooNoteElement.java index 1729f4a..e93eb29 100644 --- a/MooNoteElement.java +++ b/MooNoteElement.java @@ -13,7 +13,6 @@ public class MooNoteElement extends JPanel { private MooTrackView mtv; private MooNote note; - private int columns; private boolean selected; private Rectangle pitchRect, veloRect; public static final Color bgColor = new Color(160, 218, 255); @@ -31,7 +30,6 @@ public class MooNoteElement extends JPanel { mtv = parent; note = mn; calculateString(); - columns = mn.getDuration() / (Moosique.getSequence().getResolution() / 4); setBorder(BorderFactory.createLineBorder(Color.black)); setBackground(bgColor); addMouseListener(new MAdapter()); @@ -138,8 +136,7 @@ public class MooNoteElement extends JPanel { calculateString(); } e.getComponent().repaint(); - } - else if (e.isPopupTrigger()) { + } else if (e.isPopupTrigger()) { popup.show(e.getComponent(), e.getX(), e.getY()); } } @@ -157,7 +154,7 @@ public class MooNoteElement extends JPanel { } protected void remove(){ - mtv.remove(this); + mtv.removeNote(this, note); } }