/[svn]/jsampler/trunk/src/org/jsampler/task/UpdateChannels.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/task/UpdateChannels.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1879 by iliev, Mon Mar 16 22:12:32 2009 UTC revision 1880 by iliev, Sun Mar 29 19:10:49 2009 UTC
# Line 54  public class UpdateChannels extends Enha Line 54  public class UpdateChannels extends Enha
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
# Line 74  public class UpdateChannels extends Enha Line 74  public class UpdateChannels extends Enha
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                                    
# Line 89  public class UpdateChannels extends Enha Line 92  public class UpdateChannels extends Enha
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    

Legend:
Removed from v.1879  
changed lines
  Added in v.1880

  ViewVC Help
Powered by ViewVC