diff changesetitem.cpp @ 133:aaeab914f2a3

* Better attempt at retaining current visible area when history scene changes; first cut at highlighting new items
author Chris Cannam
date Tue, 30 Nov 2010 12:45:34 +0000
parents 16ceeee30e2a
children bad40d7e7a2b
line wrap: on
line diff
--- a/changesetitem.cpp	Tue Nov 30 11:41:46 2010 +0000
+++ b/changesetitem.cpp	Tue Nov 30 12:45:34 2010 +0000
@@ -28,7 +28,8 @@
 
 ChangesetItem::ChangesetItem(Changeset *cs) :
     m_changeset(cs), m_detail(0),
-    m_showBranch(false), m_column(0), m_row(0), m_wide(false), m_current(false)
+    m_showBranch(false), m_column(0), m_row(0), m_wide(false),
+    m_current(false), m_new(false)
 {
     m_font = QFont();
     m_font.setPixelSize(11);
@@ -122,6 +123,13 @@
     QRectF r(x0, 0, width - 3, height);
     paint->drawRect(r);
 
+    if (m_new) {
+        paint->save();
+        paint->setPen(Qt::yellow);
+        paint->drawRect(QRectF(x0 - 2, -2, width + 1, height + 4));
+        paint->restore();
+    }
+
     if (m_current) {
         paint->drawRect(QRectF(x0 - 4, -4, width + 5, height + 8));
     }