Mercurial > hg > easyhg
changeset 147:465c8d51c6d5
* Don't show tip tag; return to using incremental log on commit
author | Chris Cannam |
---|---|
date | Wed, 01 Dec 2010 20:19:21 +0000 |
parents | 5e16b83374fd |
children | 2fef6b0dfbe8 |
files | changesetitem.cpp historywidget.cpp mainwindow.cpp |
diffstat | 3 files changed, 26 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/changesetitem.cpp Wed Dec 01 17:43:43 2010 +0000 +++ b/changesetitem.cpp Wed Dec 01 20:19:21 2010 +0000 @@ -204,12 +204,26 @@ paint->setPen(QPen(Qt::black)); - QString tags = m_changeset->tags().join(" ").trimmed(); - if (tags != "") { - int tw = fm.width(tags); - paint->fillRect(QRectF(x0 + width - 8 - tw, 1, tw + 4, fh - 1), - QBrush(Qt::yellow)); - paint->drawText(x0 + width - 6 - tw, fm.ascent(), tags); + QStringList tags = m_changeset->tags(); + if (!tags.empty()) { + QStringList nonTipTags; + foreach (QString t, tags) { + // I'm not convinced that showing the tip tag really + // works; I think perhaps it confuses as much as it + // illuminates. But also, our current implementation + // doesn't interact well with it because it moves -- it's + // the one thing that can actually (in normal use) change + // inside an existing changeset record even during an + // incremental update + if (t != "tip") nonTipTags.push_back(t); + } + if (!nonTipTags.empty()) { + QString tagText = nonTipTags.join(" ").trimmed(); + int tw = fm.width(tagText); + paint->fillRect(QRectF(x0 + width - 8 - tw, 1, tw + 4, fh - 1), + QBrush(Qt::yellow)); + paint->drawText(x0 + width - 6 - tw, fm.ascent(), tagText); + } } if (m_showBranch) {
--- a/historywidget.cpp Wed Dec 01 17:43:43 2010 +0000 +++ b/historywidget.cpp Wed Dec 01 20:19:21 2010 +0000 @@ -221,9 +221,12 @@ if (newid) { DEBUG << "id " << id << " is new" << endl; } - - csit->setCurrent(current); - csit->setNew(newid); + + if (csit->isCurrent() != current || csit->isNew() != newid) { + csit->setCurrent(current); + csit->setNew(newid); + csit->update(); + } } }