Mercurial > hg > easyhg
comparison src/historywidget.cpp @ 621:f635e227775c
History widget stays on top when closing a branch.
author | fpozo <pozofelipe@yahoo.es> |
---|---|
date | Wed, 17 Oct 2012 12:15:25 +0200 |
parents | 6f90bb52eee6 |
children | 66adbedb69a9 |
comparison
equal
deleted
inserted
replaced
620:7f1adcdc6cdc | 621:f635e227775c |
---|---|
69 m_showClosedBranches = new QCheckBox(tr("Show closed branches"), this); | 69 m_showClosedBranches = new QCheckBox(tr("Show closed branches"), this); |
70 m_showClosedBranches->setChecked(showClosed); | 70 m_showClosedBranches->setChecked(showClosed); |
71 connect(m_showClosedBranches, SIGNAL(toggled(bool)), | 71 connect(m_showClosedBranches, SIGNAL(toggled(bool)), |
72 this, SLOT(showClosedChanged(bool))); | 72 this, SLOT(showClosedChanged(bool))); |
73 optLayout->addWidget(m_showClosedBranches, 0, 1, Qt::AlignRight); | 73 optLayout->addWidget(m_showClosedBranches, 0, 1, Qt::AlignRight); |
74 m_showClosedBranches->hide(); | 74 // m_showClosedBranches->hide(); |
75 | 75 |
76 setLayout(layout); | 76 setLayout(layout); |
77 } | 77 } |
78 | 78 |
79 HistoryWidget::~HistoryWidget() | 79 HistoryWidget::~HistoryWidget() |
241 std::cerr << "Internal error: Layout failed: " << s << std::endl; | 241 std::cerr << "Internal error: Layout failed: " << s << std::endl; |
242 } | 242 } |
243 toFocus = g.getUncommittedItem(); | 243 toFocus = g.getUncommittedItem(); |
244 if (!toFocus) { | 244 if (!toFocus) { |
245 if (!m_currentIds.empty()) { | 245 if (!m_currentIds.empty()) { |
246 toFocus = g.getItemFor(m_currentIds[0]); | 246 for (int i = 0; i < m_currentIds.size(); ++i) { |
247 toFocus = g.getItemFor(m_currentIds[i]); | |
248 if (toFocus != 0) { | |
249 break; | |
250 } | |
251 } | |
247 } else { | 252 } else { |
248 toFocus = g.getItemFor(m_changesets[0]); | 253 toFocus = g.getItemFor(m_changesets[0]); |
254 } | |
255 } | |
256 if (!toFocus) { | |
257 for (int i = 0; i < m_changesets.size(); ++i) { | |
258 toFocus = g.getItemFor(m_changesets[i]); | |
259 if (toFocus != 0) { | |
260 break; | |
261 } | |
249 } | 262 } |
250 } | 263 } |
251 } | 264 } |
252 | 265 |
253 m_panned->setScene(scene); | 266 m_panned->setScene(scene); |