Tweaks to preset handling
authorMark Slee <mcslee@Mark-Slees-MacBook-Pro.local>
Mon, 21 Oct 2013 18:19:41 +0000 (11:19 -0700)
committerMark Slee <mcslee@Mark-Slees-MacBook-Pro.local>
Mon, 21 Oct 2013 18:19:41 +0000 (11:19 -0700)
_MIDI.pde
_Presets.pde

index 1a2f01512a6c62712f6133db0c0265b6d0a539bb..4e7cc1f1248c06b637492f5ac970f98217e78e27 100644 (file)
--- 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() {
index edb4f18ba5f1785627afe230127803fa7cacdb69..ca3957ea4cbbb679ec1b45d03f40b7134021ea8b 100644 (file)
@@ -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);
           }
         }
       });