diff changesetitem.cpp @ 74:10eb97683aa9

* Show branch names even for changes with children, if those children are on a different branch * Pick up remote repo path from local repo via hg paths * Some work towards breaking down files into various groups based on status * Add /usr/local/bin to path for hg (temporary hack I hope)
author Chris Cannam
date Fri, 19 Nov 2010 14:54:19 +0000
parents 5616a814c58b
children d5db15bf250c
line wrap: on
line diff
--- a/changesetitem.cpp	Thu Nov 18 18:08:18 2010 +0000
+++ b/changesetitem.cpp	Fri Nov 19 14:54:19 2010 +0000
@@ -23,7 +23,7 @@
 #include <QPainter>
 
 ChangesetItem::ChangesetItem(Changeset *cs) :
-    m_changeset(cs), m_column(0), m_row(0), m_wide(false)
+    m_changeset(cs), m_showBranch(false), m_column(0), m_row(0), m_wide(false)
 {
     m_font = QFont();
     m_font.setPixelSize(11);
@@ -93,11 +93,12 @@
 
     paint->setPen(QPen(Qt::black));
 
-    if (m_changeset->children().empty()) {
+    if (m_showBranch) {
 	// write branch name
 	f.setBold(true);
 	paint->setFont(f);
 	QString branch = m_changeset->branch();
+        if (branch == "") branch = "default";
 	int wid = width - 3;
 	branch = TextAbbrev::abbreviate(branch, QFontMetrics(f), wid);
 	paint->drawText(x0, -fh + fm.ascent() - 4, branch);