summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/stackhandler.cpp
diff options
context:
space:
mode:
authorAurindam Jana <aurindam.jana@nokia.com>2012-02-23 17:13:28 +0100
committerhjk <qthjk@ovi.com>2012-02-23 18:06:32 +0100
commit7e380e9d0cb31349f20d7fb2a5c0f07a2865dd1d (patch)
tree37f62d1daa24813e960415c6f37099ebb08f15df /src/plugins/debugger/stackhandler.cpp
parente3087ff7a9cad8fc216d48973aee5fa23b82bcb0 (diff)
downloadqt-creator-7e380e9d0cb31349f20d7fb2a5c0f07a2865dd1d.tar.gz
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>
Diffstat (limited to 'src/plugins/debugger/stackhandler.cpp')
-rw-r--r--src/plugins/debugger/stackhandler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/debugger/stackhandler.cpp b/src/plugins/debugger/stackhandler.cpp
index 6a28e4fdc5..04efb34b3c 100644
--- a/src/plugins/debugger/stackhandler.cpp
+++ b/src/plugins/debugger/stackhandler.cpp
@@ -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();
}