Mercurial > hg > easyhg
comparison src/historywidget.cpp @ 371:f051d210521e
Ensure current item is visible in graph after update
author | Chris Cannam |
---|---|
date | Thu, 24 Mar 2011 10:47:03 +0000 |
parents | b9c153e00e84 |
children | 61bde1f0ff0a |
comparison
equal
deleted
inserted
replaced
370:b9c153e00e84 | 371:f051d210521e |
---|---|
182 } catch (std::string s) { | 182 } catch (std::string s) { |
183 std::cerr << "Internal error: Layout failed: " << s << std::endl; | 183 std::cerr << "Internal error: Layout failed: " << s << std::endl; |
184 } | 184 } |
185 toFocus = g.getUncommittedItem(); | 185 toFocus = g.getUncommittedItem(); |
186 if (!toFocus) { | 186 if (!toFocus) { |
187 toFocus = g.getItemFor(m_changesets[0]); | 187 if (!m_currentIds.empty()) { |
188 toFocus = g.getItemFor(m_currentIds[0]); | |
189 } else { | |
190 toFocus = g.getItemFor(m_changesets[0]); | |
191 } | |
188 } | 192 } |
189 } | 193 } |
190 | 194 |
191 m_panned->setScene(scene); | 195 m_panned->setScene(scene); |
192 m_panner->setScene(scene); | 196 m_panner->setScene(scene); |