Mercurial > hg > easyhg
comparison src/historywidget.cpp @ 506:470829a21f98
Identify closed branches and display them in a lighter shade
author | Chris Cannam |
---|---|
date | Mon, 17 Oct 2011 22:08:05 +0100 |
parents | 1c05e7576ea5 |
children | ddc7238fc3b0 |
comparison
equal
deleted
inserted
replaced
505:1c05e7576ea5 | 506:470829a21f98 |
---|---|
85 } | 85 } |
86 | 86 |
87 m_refreshNeeded = true; | 87 m_refreshNeeded = true; |
88 } | 88 } |
89 | 89 |
90 void HistoryWidget::setClosedHeadIds(QSet<QString> closed) | |
91 { | |
92 if (closed == m_closedIds) return; | |
93 m_closedIds = closed; | |
94 m_refreshNeeded = true; | |
95 } | |
96 | |
90 void HistoryWidget::setShowUncommitted(bool showUncommitted) | 97 void HistoryWidget::setShowUncommitted(bool showUncommitted) |
91 { | 98 { |
92 setCurrent(m_currentIds, m_currentBranch, showUncommitted); | 99 setCurrent(m_currentIds, m_currentBranch, showUncommitted); |
93 } | 100 } |
94 | 101 |
179 | 186 |
180 QGraphicsItem *toFocus = 0; | 187 QGraphicsItem *toFocus = 0; |
181 | 188 |
182 if (!m_changesets.empty()) { | 189 if (!m_changesets.empty()) { |
183 Grapher g(scene); | 190 Grapher g(scene); |
191 g.setClosedHeadIds(m_closedIds); | |
184 try { | 192 try { |
185 g.layout(m_changesets, | 193 g.layout(m_changesets, |
186 m_showUncommitted ? m_currentIds : QStringList(), | 194 m_showUncommitted ? m_currentIds : QStringList(), |
187 m_currentBranch); | 195 m_currentBranch); |
188 } catch (std::string s) { | 196 } catch (std::string s) { |
249 bool newid = m_newIds.contains(id); | 257 bool newid = m_newIds.contains(id); |
250 if (newid) { | 258 if (newid) { |
251 DEBUG << "id " << id << " is new" << endl; | 259 DEBUG << "id " << id << " is new" << endl; |
252 } | 260 } |
253 | 261 |
254 if (csit->isCurrent() != current || csit->isNew() != newid) { | 262 if (csit->isCurrent() != current || |
263 csit->isNew() != newid) { | |
255 csit->setCurrent(current); | 264 csit->setCurrent(current); |
256 csit->setNew(newid); | 265 csit->setNew(newid); |
257 csit->update(); | 266 csit->update(); |
258 } | 267 } |
259 } | 268 } |