diff view/ViewManager.cpp @ 333:e74b56f07c73

* Some work on correct alignment when moving panes during playback * Overhaul alignment for playback frame values (view manager now always refers to reference-timeline values, only the play source deals in playback model timeline values) * When making a selection, ensure the selection regions shown in other panes (and used for playback constraints if appropriate) are aligned correctly. This may be the coolest feature ever implemented in any program ever.
author Chris Cannam
date Thu, 22 Nov 2007 14:17:19 +0000
parents 4f4f38a11cd2
children 1b6879d03cb6 0895517bb2d1
line wrap: on
line diff
--- a/view/ViewManager.cpp	Mon Nov 19 15:50:14 2007 +0000
+++ b/view/ViewManager.cpp	Thu Nov 22 14:17:19 2007 +0000
@@ -173,6 +173,20 @@
     m_playbackModel = model;
 }
 
+size_t
+ViewManager::alignPlaybackFrameToReference(size_t frame) const
+{
+    if (!m_playbackModel) return frame;
+    else return m_playbackModel->alignToReference(frame);
+}
+
+size_t
+ViewManager::alignReferenceToPlaybackFrame(size_t frame) const
+{
+    if (!m_playbackModel) return frame;
+    else return m_playbackModel->alignFromReference(frame);
+}
+
 bool
 ViewManager::haveInProgressSelection() const
 {