diff src/changesetitem.cpp @ 649:35b0a7aa1fc1

Show tag on merge commit (fixing #534)
author Chris Cannam
date Thu, 24 Jan 2013 15:05:40 +0000
parents ae67ea0af696
children ce29dc775650
line wrap: on
line diff
--- a/src/changesetitem.cpp	Thu Jan 24 14:02:50 2013 +0000
+++ b/src/changesetitem.cpp	Thu Jan 24 15:05:40 2013 +0000
@@ -578,6 +578,21 @@
         paint->restore();
     }
 
+    QStringList tags = m_changeset->tags();
+    if (!tags.empty()) {
+        QStringList nonTipTags;
+        foreach (QString t, tags) {
+            if (t != "tip") nonTipTags.push_back(t);
+        }
+        if (!nonTipTags.empty()) {
+            QString tagText = nonTipTags.join(" ").trimmed();
+            int tw = fm.width(tagText);
+            paint->fillRect(QRectF(x0 + size/2 + 2, 0, tw + 4, fh - 1),
+                            QBrush(Qt::yellow));
+            paint->drawText(x0 + size/2 + 4, fm.ascent() - 1, tagText);
+        }
+    }
+
     if (m_current && showProperLines) {
         paint->setRenderHint(QPainter::SmoothPixmapTransform, true);
         int starSize = fh * 1.5;