Changeset 1555
- Timestamp:
- 05/10/21 11:11:48 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/apollo/AudioFrameMouseActions.java
r1102 r1555 30 30 public class AudioFrameMouseActions implements MouseMotionListener, MouseListener { 31 31 32 private static final int COARSE_X_PLACEMENT_TOLERANCE = 80; // The mini um distance from a track widet to auto-align free space items to32 private static final int COARSE_X_PLACEMENT_TOLERANCE = 80; // The minimum distance from a track widget to auto-align free space items to 33 33 34 34 private static final int COARSE_Y_PLACEMENT_TOLERANCE = 20; … … 39 39 private static List<Item> anchoringItems = new LinkedList<Item>(); 40 40 41 protected static boolean hasTimeline() 42 { 43 return FrameLayoutDaemon.inferCurrentTotalMSTime()>0; 44 } 45 41 46 public void mouseDragged(MouseEvent e) { 42 47 FrameMouseActions.getInstance().mouseDragged(e); … … 155 160 } 156 161 157 // Expeditee s frame mouse actions uses an offset and fights over free-item162 // Expeditee's frame mouse actions uses an offset and fights over free-item 158 163 // movement if it listens to the mouse event router... therefore add an extra 159 164 // layer to avoid this... otherwise auto-aligned items jitter like crazy while … … 179 184 180 185 public void mousePressed(MouseEvent e) { 181 isAnchoring = (e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) != 0; 182 isStamping = (e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) != 0; 186 if (hasTimeline()) { 187 isAnchoring = (e.getModifiersEx() & MouseEvent.BUTTON2_DOWN_MASK) != 0; 188 isStamping = (e.getModifiersEx() & MouseEvent.BUTTON3_DOWN_MASK) != 0; 189 } 190 183 191 FrameMouseActions.getInstance().mousePressed(e); 184 192 } … … 303 311 */ 304 312 public static boolean isYAxisRestictionOn() { 305 return AudioFrameKeyboardActions.isControlDown && !AudioFrameKeyboardActions.isShiftDown; 313 if (!hasTimeline()) { 314 return false; 315 } 316 else { 317 return AudioFrameKeyboardActions.isControlDown && !AudioFrameKeyboardActions.isShiftDown; 318 } 306 319 } 307 320 308 321 public static boolean isSnapOn() { 309 return AudioFrameKeyboardActions.isShiftDown && !AudioFrameKeyboardActions.isControlDown; 322 if (!hasTimeline()) { 323 return false; 324 } 325 else { 326 return AudioFrameKeyboardActions.isShiftDown && !AudioFrameKeyboardActions.isControlDown; 327 } 310 328 } 311 329
Note:
See TracChangeset
for help on using the changeset viewer.