# HG changeset patch # User Chris Cannam # Date 1359039940 0 # Node ID 35b0a7aa1fc1105a0a6b768025d79ef579d01d80 # Parent b55466f7b8bfef09b05fc6561ee094faf15ec809 Show tag on merge commit (fixing #534) diff -r b55466f7b8bf -r 35b0a7aa1fc1 src/changesetitem.cpp --- 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;