StackHandler: Set Current Index

Set the current Index as 0 (topmost stack frame)
when setFrames() is called.

Change-Id: Iff0acd672930b51b53ef7ad0335b62d463c14500
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Aurindam Jana
2012-02-23 17:13:28 +01:00
committed by hjk
parent e3087ff7a9
commit 7e380e9d0c

View File

@@ -197,8 +197,10 @@ void StackHandler::setFrames(const StackFrames &frames, bool canExpand)
m_contentsValid = true;
m_canExpand = canExpand;
m_stackFrames = frames;
if (m_currentIndex >= m_stackFrames.size())
setCurrentIndex(m_stackFrames.size() - 1);
if (m_stackFrames.size() >= 0)
setCurrentIndex(0);
else
m_currentIndex = -1;
reset();
emit stackChanged();
}