Changeset 1156 for trunk


Ignore:
Timestamp:
09/20/18 14:20:32 (6 years ago)
Author:
bln4
Message:

org.apollo.widgets.SampledTrack ->

Raised visibility of SampledTrack.ignoreInjection through a getter and setter. This is used in a fix for moving SampledTracks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/apollo/widgets/SampledTrack.java

    r1154 r1156  
    4141import org.apollo.gui.PlaybackControlPopup;
    4242import org.apollo.gui.SampledTrackGraphView;
     43import org.apollo.gui.SampledTrackGraphView.EffecientInvalidator;
    4344import org.apollo.gui.Strokes;
    44 import org.apollo.gui.SampledTrackGraphView.EffecientInvalidator;
    4545import org.apollo.io.AudioIO;
     46import org.apollo.io.AudioIO.AudioFileLoader;
    4647import org.apollo.io.AudioPathManager;
    4748import org.apollo.io.IconRepository;
    48 import org.apollo.io.AudioIO.AudioFileLoader;
    4949import org.apollo.items.EmulatedTextItem;
    5050import org.apollo.items.EmulatedTextItem.TextChangeListener;
     
    7777import org.expeditee.items.widgets.InteractiveWidgetNotAvailableException;
    7878import org.expeditee.items.widgets.Widget;
    79 import org.expeditee.taskmanagement.EntitySaveManager;
    8079
    8180/**
     
    237236                        fulltrackView.setBackColor(SampledTrackGraphView.DEFAULT_BACKGROUND_COLOR, SampledTrackGraphView.DEFAULT_BACKGROUND_HIGHTLIGHTS_COLOR);
    238237                }
    239                
    240                 EntitySaveManager.getInstance().saveAll();
    241 
    242238        }
    243239
     
    307303                                       
    308304                                        // Determine where popup should show
    309                                         int x = SampledTrack.this.getX();
     305                                        //int x = SampledTrack.this.getX();
    310306                                        int y = SampledTrack.this.getY() - playbackControlPopup.getFullBounds().getHeight() - 2; // by default show above
    311307                                       
     
    14421438                                        MouseEvent me = MouseEventRouter.getCurrentMouseEvent();
    14431439                                       
    1444                                         if (!ignoreInjection && me != null && me != lastInsertME &&
     1440                                        if (!isIgnoreInjection() && me != null && me != lastInsertME &&
    14451441                                                        (me.getButton() == MouseEvent.BUTTON2 ||
    14461442                                                                        me.getButton() == MouseEvent.BUTTON3)) {
     
    14661462                                                }
    14671463                                                       
    1468                                         } else if (!ignoreInjection && me == lastInsertME) {
     1464                                        } else if (!isIgnoreInjection() && me == lastInsertME) {
    14691465                                                // Note due to a injection removing this widget while in the midst of
    14701466                                                // anchoring, the widget parent event filtering will not work thus
     
    17941790       
    17951791                                // Anchor it
    1796                                 rightSideTrack.ignoreInjection = true;
     1792                                rightSideTrack.setIgnoreInjection(true);
    17971793                                target.addAllItems(rightSideTrack.getItems());
    1798                                 rightSideTrack.ignoreInjection = false;
     1794                                rightSideTrack.setIgnoreInjection(false);
    17991795                               
    18001796                                // Adjust initiation time to be exact
     
    21362132                return false;
    21372133        }
     2134
     2135        public boolean isIgnoreInjection() {
     2136                return ignoreInjection;
     2137        }
     2138
     2139        public void setIgnoreInjection(boolean ignoreInjection) {
     2140                this.ignoreInjection = ignoreInjection;
     2141        }
    21382142}
Note: See TracChangeset for help on using the changeset viewer.