diff panner.cpp @ 250:be483734bde5

* Make it possible for changeset items to take two or three lines of description, depending on how much there is * Some other small improvements to how changeset items are drawn (e.g. give them opaque white backgrounds)
author Chris Cannam
date Tue, 11 Jan 2011 17:58:14 +0000
parents 8fd71f570884
children
line wrap: on
line diff
--- a/panner.cpp	Tue Jan 11 17:56:22 2011 +0000
+++ b/panner.cpp	Tue Jan 11 17:58:14 2011 +0000
@@ -110,6 +110,7 @@
 void
 Panner::resizeEvent(QResizeEvent *)
 {
+    DEBUG << "Panner::resizeEvent" << endl;
     if (scene()) fit(sceneRect());
     m_cache = QPixmap();
 }
@@ -117,6 +118,7 @@
 void
 Panner::slotSceneRectChanged(const QRectF &newRect)
 {
+    DEBUG << "Panner::slotSceneRectChanged" << endl;
     if (!scene()) return; // spurious
     fit(newRect);
     m_cache = QPixmap();
@@ -126,6 +128,7 @@
 void
 Panner::slotSceneChanged(const QList<QRectF> &)
 {
+    DEBUG << "Panner::slotSceneChanged" << endl;
     if (!scene()) return; // spurious
     m_cache = QPixmap();
     viewport()->update();
@@ -163,7 +166,8 @@
 void
 Panner::updateScene(const QList<QRectF> &rects)
 {
-    if (!m_cache.isNull()) m_cache = QPixmap();
+    DEBUG << "Panner::updateScene" << endl;
+//    if (!m_cache.isNull()) m_cache = QPixmap();
     QGraphicsView::updateScene(rects);
 }
 
@@ -187,6 +191,8 @@
         cachePainter.setTransform(viewportTransform());
         ps->drawItems(&cachePainter, numItems, items, options);
         cachePainter.end();
+
+        DEBUG << "done" << endl;
     }
 
     painter->save();