Changeset 344 for trunk/src_apollo/org/apollo/widgets
- Timestamp:
- 10/05/08 14:30:01 (16 years ago)
- Location:
- trunk/src_apollo/org/apollo/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src_apollo/org/apollo/widgets/LinkedTrack.java
r343 r344 31 31 32 32 import org.apollo.ApolloSystem; 33 import org.apollo.AudioFrameMouseActions; 33 34 import org.apollo.audio.ApolloSubjectChangedEvent; 34 35 import org.apollo.audio.SampledAudioManager; … … 57 58 import org.apollo.util.AudioMath; 58 59 import org.apollo.util.AudioSystemLog; 60 import org.apollo.util.NullableLong; 59 61 import org.apollo.util.ODFrameHeirarchyFetcher; 60 62 import org.apollo.util.PopupReaper; … … 645 647 String link = getAbsoluteLink(); 646 648 647 // Determine new initation time according to anchored position 648 long initTime = (parent != null) ? 649 FrameLayoutDaemon.getInstance().getMSAtX(getX(), parent) 650 : 0; 649 650 // Determine new initation time according to anchored position... 651 long initTime = getInitiationTimeFromMeta(); 652 653 // If the user is restricting-y-axis movement then they might be moving 654 // this tracks Y-position only for layout reasons as opposed to repositioning 655 // where in the audio timeline the track should be. This must be accurate and 656 // avoid loosing the exact initiation time due to pixel-resolutoin issues 657 if (parent != null) { 658 659 boolean inferInitTime = true; 660 661 if (AudioFrameMouseActions.isYAxisRestictionOn()) { 662 Long ms = getInitiationTimeFromMeta(); 663 if (ms != null) { 664 NullableLong timex = FrameLayoutDaemon.getInstance().getXAtMS( 665 ms, 666 parent); 667 if (timex != null && timex.getLongValue() == getX()) { 668 initTime = ms; 669 inferInitTime = false; 670 } 671 } 672 } 673 674 if (inferInitTime) 675 initTime = FrameLayoutDaemon.getInstance().getMSAtX(getX(), parent); 676 } 651 677 652 678 if (link != null) { -
trunk/src_apollo/org/apollo/widgets/SampledTrack.java
r342 r344 28 28 import javax.swing.SwingUtilities; 29 29 30 import org.apollo.AudioFrameMouseActions; 30 31 import org.apollo.audio.ApolloPlaybackMixer; 31 32 import org.apollo.audio.ApolloSubjectChangedEvent; … … 53 54 import org.apollo.mvc.SubjectChangedEvent; 54 55 import org.apollo.util.AudioMath; 56 import org.apollo.util.NullableLong; 55 57 import org.apollo.util.PopupReaper; 56 58 import org.apollo.util.TrackModelHandler; … … 1361 1363 parent = getParentFrame(); 1362 1364 1363 // Determine new initation time according to anchored position 1364 long initTime = (parent != null) ? 1365 FrameLayoutDaemon.getInstance().getMSAtX(getX(), parent) 1366 : 0; 1367 1365 // Determine new initation time according to anchored position... 1366 long initTime = getInitiationTimeFromMeta(); 1367 1368 // If the user is restricting-y-axis movement then they might be moving 1369 // this tracks Y-position only for layout reasons as opposed to repositioning 1370 // where in the audio timeline the track should be. This must be accurate and 1371 // avoid loosing the exact initiation time due to pixel-resolutoin issues 1372 if (parent != null) { 1373 1374 boolean inferInitTime = true; 1375 1376 if (AudioFrameMouseActions.isYAxisRestictionOn()) { 1377 Long ms = getInitiationTimeFromMeta(); 1378 if (ms != null) { 1379 NullableLong timex = FrameLayoutDaemon.getInstance().getXAtMS( 1380 ms, 1381 parent); 1382 if (timex != null && timex.getLongValue() == getX()) { 1383 initTime = ms; 1384 inferInitTime = false; 1385 } 1386 } 1387 } 1388 1389 if (inferInitTime) 1390 initTime = FrameLayoutDaemon.getInstance().getMSAtX(getX(), parent); 1391 } 1392 1368 1393 // Keep TrackGraphModel consistant 1369 1394 AudioStructureModel.getInstance().onTrackWidgetAnchored(
Note:
See TracChangeset
for help on using the changeset viewer.