diff layer/TimeInstantLayer.cpp @ 387:f329416bf1a5

* Permit holding Shift while dragging an instant or other edited thing, to override the initial drag resistance (for #1928943 sticky time instants) * better handling of updates during progressive decode load * ready() signal from model (used by vect)
author Chris Cannam
date Mon, 19 May 2008 17:23:11 +0000
parents e1a9e478b7f2
children 427e5c58658e
line wrap: on
line diff
--- a/layer/TimeInstantLayer.cpp	Fri May 16 13:27:07 2008 +0000
+++ b/layer/TimeInstantLayer.cpp	Mon May 19 17:23:11 2008 +0000
@@ -35,6 +35,8 @@
 #include <iostream>
 #include <cmath>
 
+#define DEBUG_TIME_INSTANT_LAYER 1
+
 TimeInstantLayer::TimeInstantLayer() :
     SingleColourLayer(),
     m_model(0),
@@ -57,7 +59,9 @@
 
     connectSignals(m_model);
 
+#ifdef DEBUG_TIME_INSTANT_LAYER
     std::cerr << "TimeInstantLayer::setModel(" << model << ")" << std::endl;
+#endif
 
     emit modelReplaced();
 }
@@ -446,7 +450,9 @@
 void
 TimeInstantLayer::drawStart(View *v, QMouseEvent *e)
 {
+#ifdef DEBUG_TIME_INSTANT_LAYER
     std::cerr << "TimeInstantLayer::drawStart(" << e->x() << ")" << std::endl;
+#endif
 
     if (!m_model) return;
 
@@ -467,7 +473,9 @@
 void
 TimeInstantLayer::drawDrag(View *v, QMouseEvent *e)
 {
+#ifdef DEBUG_TIME_INSTANT_LAYER
     std::cerr << "TimeInstantLayer::drawDrag(" << e->x() << ")" << std::endl;
+#endif
 
     if (!m_model || !m_editing) return;
 
@@ -482,7 +490,9 @@
 void
 TimeInstantLayer::drawEnd(View *, QMouseEvent *e)
 {
+#ifdef DEBUG_TIME_INSTANT_LAYER
     std::cerr << "TimeInstantLayer::drawEnd(" << e->x() << ")" << std::endl;
+#endif
     if (!m_model || !m_editing) return;
     QString newName = tr("Add Point at %1 s")
 	.arg(RealTime::frame2RealTime(m_editingPoint.frame,
@@ -541,7 +551,9 @@
 void
 TimeInstantLayer::editStart(View *v, QMouseEvent *e)
 {
+#ifdef DEBUG_TIME_INSTANT_LAYER
     std::cerr << "TimeInstantLayer::editStart(" << e->x() << ")" << std::endl;
+#endif
 
     if (!m_model) return;
 
@@ -561,7 +573,9 @@
 void
 TimeInstantLayer::editDrag(View *v, QMouseEvent *e)
 {
+#ifdef DEBUG_TIME_INSTANT_LAYER
     std::cerr << "TimeInstantLayer::editDrag(" << e->x() << ")" << std::endl;
+#endif
 
     if (!m_model || !m_editing) return;
 
@@ -582,7 +596,9 @@
 void
 TimeInstantLayer::editEnd(View *, QMouseEvent *e)
 {
+#ifdef DEBUG_TIME_INSTANT_LAYER
     std::cerr << "TimeInstantLayer::editEnd(" << e->x() << ")" << std::endl;
+#endif
     if (!m_model || !m_editing) return;
     if (m_editingCommand) {
 	QString newName = tr("Move Point to %1 s")