54 |
SamplerModel sm = CC.getSamplerModel(); |
SamplerModel sm = CC.getSamplerModel(); |
55 |
Integer[] chnIDs = CC.getClient().getSamplerChannelIDs(); |
Integer[] chnIDs = CC.getClient().getSamplerChannelIDs(); |
56 |
|
|
57 |
boolean found = false; |
boolean found = false, changed = false; |
58 |
|
|
59 |
boolean oldValue = CC.getSamplerModel().getChannelListIsAdjusting(); |
boolean isAdjustingOld = CC.getSamplerModel().getChannelListIsAdjusting(); |
60 |
|
|
61 |
javax.swing.SwingUtilities.invokeAndWait(new Runnable() { |
javax.swing.SwingUtilities.invokeAndWait(new Runnable() { |
62 |
public void |
public void |
74 |
} |
} |
75 |
} |
} |
76 |
|
|
77 |
if(!found) sm.removeChannelById(m.getChannelId()); |
if(!found) { |
78 |
|
sm.removeChannelById(m.getChannelId()); |
79 |
|
changed = true; |
80 |
|
} |
81 |
found = false; |
found = false; |
82 |
} |
} |
83 |
|
|
92 |
|
|
93 |
if(v.size() > 0) sm.addChannel(v.elementAt(v.size() - 1)); |
if(v.size() > 0) sm.addChannel(v.elementAt(v.size() - 1)); |
94 |
else if(!CC.getSamplerModel().getChannelListIsAdjusting()) { |
else if(!CC.getSamplerModel().getChannelListIsAdjusting()) { |
95 |
// FIXME: no change after |
if(!isAdjustingOld && !changed); // do nothing if nothing is changed |
96 |
// CC.getSamplerModel().setChannelListIsAdjusting(false); |
else sm.addChannel(null); // fire dummy event to end an adjusting sequence |
97 |
} |
} |
98 |
} |
} |
99 |
|
|