From: Mark Slee Date: Mon, 21 Oct 2013 18:19:41 +0000 (-0700) Subject: Tweaks to preset handling X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=887295bc99acacc01721b2c30e1ed4a4271982d0;p=SugarCubes.git Tweaks to preset handling --- diff --git a/_MIDI.pde b/_MIDI.pde index 1a2f015..4e7cc1f 100644 --- a/_MIDI.pde +++ b/_MIDI.pde @@ -364,10 +364,7 @@ public class APC40MidiInput extends GenericDeviceMidiInput { } protected Engine.Deck getTargetDeck() { - if (targetDeck != null) { - return targetDeck; - } - return midiEngine.getFocusedDeck(); + return (targetDeck != null) ? targetDeck : midiEngine.getFocusedDeck(); } protected SCPattern getTargetPattern() { diff --git a/_Presets.pde b/_Presets.pde index edb4f18..ca3957e 100644 --- a/_Presets.pde +++ b/_Presets.pde @@ -36,10 +36,8 @@ class PresetManager implements LXParameter.Listener { for (Engine.Deck deck : lx.engine.getDecks()) { deck.addListener(new Engine.AbstractListener() { public void patternDidChange(Engine.Deck deck, LXPattern pattern) { - if (midiEngine.getFocusedDeck() == deck) { - if (pattern != loadedPattern) { - onPresetDirty(deck); - } + if (pattern != loadedPattern) { + onPresetDirty(deck); } } });