diff view/ViewManager.cpp @ 830:8bb9320f78a4

Debug output stuff
author Chris Cannam
date Fri, 25 Jul 2014 17:02:29 +0100
parents d974ed657176
children d4446f267e12
line wrap: on
line diff
--- a/view/ViewManager.cpp	Fri Jul 25 17:02:16 2014 +0100
+++ b/view/ViewManager.cpp	Fri Jul 25 17:02:29 2014 +0100
@@ -190,15 +190,35 @@
 int
 ViewManager::alignPlaybackFrameToReference(int frame) const
 {
-    if (!m_playbackModel) return frame;
-    else return m_playbackModel->alignToReference(frame);
+#ifdef DEBUG_VIEW_MANAGER
+    cerr << "ViewManager::alignPlaybackFrameToReference(" << frame << "): playback model is " << m_playbackModel << endl;
+#endif
+    if (!m_playbackModel) {
+        return frame;
+    } else {
+        int f = m_playbackModel->alignToReference(frame);
+#ifdef DEBUG_VIEW_MANAGER
+        cerr << "aligned frame = " << f << endl;
+#endif
+        return f;
+    }
 }
 
 int
 ViewManager::alignReferenceToPlaybackFrame(int frame) const
 {
-    if (!m_playbackModel) return frame;
-    else return m_playbackModel->alignFromReference(frame);
+#ifdef DEBUG_VIEW_MANAGER
+    cerr << "ViewManager::alignReferenceToPlaybackFrame(" << frame << "): playback model is " << m_playbackModel << endl;
+#endif
+    if (!m_playbackModel) {
+        return frame;
+    } else {
+        int f = m_playbackModel->alignFromReference(frame);
+#ifdef DEBUG_VIEW_MANAGER
+        cerr << "aligned frame = " << f << endl;
+#endif
+        return f;
+    }
 }
 
 bool