X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=blobdiff_plain;f=MooToolbar.java;h=43027c5a7ddbb75cd4f2191c0f6d8484b261332a;hp=e5e46da50e7a17cb39a362cf256cf4be315e0cef;hb=aae2d0b4428236b4147f466b3858a34bb7ed174f;hpb=667ddae05adc6b08c461cca470f152dc61daa8df diff --git a/MooToolbar.java b/MooToolbar.java index e5e46da..43027c5 100644 --- a/MooToolbar.java +++ b/MooToolbar.java @@ -74,6 +74,7 @@ public class MooToolbar extends JToolBar { * @param tickPosition the tick position to visualize */ public void updateProgInd(long tickPosition) { + ticksPerBeat = Moosique.getSequence().getResolution(); if (tickPosition == 0) { resetProgInd(); } else { @@ -99,7 +100,7 @@ public class MooToolbar extends JToolBar { ticksPerBeat = Moosique.getSequence().getResolution(); } - /* + /** * Creates a button with the specified image and tooltip. */ private JButton createButton(String imagelocation, String tooltip) { @@ -109,7 +110,7 @@ public class MooToolbar extends JToolBar { return button; } - /* + /** * Creates labels with the specified text and font size. */ private JLabel createLabel(String title, int fontSize){ @@ -118,7 +119,7 @@ public class MooToolbar extends JToolBar { return label; } - /* + /** * Formats the given label for the progress indicator. */ private JLabel formatProgInd(JLabel label){ @@ -148,7 +149,7 @@ public class MooToolbar extends JToolBar { Moosique.stop(); } } else if (e.getSource() instanceof JLabel) { - long position = Moosique.getPosition(); + long position = Moosique.getEditPosition(); if (e.getSource().equals(measuresValue)) { if (SwingUtilities.isRightMouseButton(e)) { position += beatsPerMeasure * ticksPerBeat; @@ -168,7 +169,7 @@ public class MooToolbar extends JToolBar { position -= 1; } } - Moosique.setPosition(position); + Moosique.setEditPosition(position); Moosique.getGUI().update(position); } }