diff view/View.cpp @ 830:8bb9320f78a4

Debug output stuff
author Chris Cannam
date Fri, 25 Jul 2014 17:02:29 +0100
parents 09026c875301
children 9ad718fdc369
line wrap: on
line diff
--- a/view/View.cpp	Fri Jul 25 17:02:16 2014 +0100
+++ b/view/View.cpp	Fri Jul 25 17:02:29 2014 +0100
@@ -44,11 +44,10 @@
 
 #include <unistd.h>
 
+//#define DEBUG_VIEW 1
 //#define DEBUG_VIEW_WIDGET_PAINT 1
 
 
-
-
 View::View(QWidget *w, bool showProgress) :
     QFrame(w),
     m_centreFrame(0),
@@ -342,7 +341,7 @@
 
 	if (e) {
             int rf = alignToReference(f);
-#ifdef DEBUG_VIEW_WIDGET_PAINT
+#ifdef DEBUG_VIEW
             cerr << "View[" << this << "]::setCentreFrame(" << f
                       << "): emitting centreFrameChanged("
                       << rf << ")" << endl;
@@ -970,7 +969,7 @@
 {
     if (m_followPan) {
         int f = alignFromReference(rf);
-#ifdef DEBUG_VIEW_WIDGET_PAINT
+#ifdef DEBUG_VIEW
         cerr << "View[" << this << "]::globalCentreFrameChanged(" << rf
                   << "): setting centre frame to " << f << endl;
 #endif
@@ -991,14 +990,26 @@
 	if (sender() != m_manager) return;
     }
 
+#ifdef DEBUG_VIEW        
+    cerr << "View::viewManagerPlaybackFrameChanged(" << f << ")" << endl;
+#endif
+
     f = getAlignedPlaybackFrame();
 
+#ifdef DEBUG_VIEW
+    cerr << " -> aligned frame = " << af << endl;
+#endif
+
     movePlayPointer(f);
 }
 
 void
 View::movePlayPointer(int newFrame)
 {
+#ifdef DEBUG_VIEW
+    cerr << "View(" << this << ")::movePlayPointer(" << newFrame << ")" << endl;
+#endif
+
     if (m_playPointerFrame == newFrame) return;
     bool visibleChange =
         (getXForFrame(m_playPointerFrame) != getXForFrame(newFrame));
@@ -1294,19 +1305,9 @@
 
     Model *aligningModel = getAligningModel();
     if (!aligningModel) return pf;
-/*
-    Model *pm = m_manager->getPlaybackModel();
-
-//    cerr << "View[" << this << "]::getAlignedPlaybackFrame: pf = " << pf;
-
-    if (pm) {
-        pf = pm->alignToReference(pf);
-//        cerr << " -> " << pf;
-    }
-*/
+
     int af = aligningModel->alignFromReference(pf);
 
-//    cerr << ", aligned = " << af << endl;
     return af;
 }