From 64af5c71644a771889fada1376ca79c2ac754c27 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 3 Jul 2009 00:33:36 +0000 Subject: [PATCH] Scroll to the active function, when selected manually. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31380 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debugger/gui/team_window/TeamWindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/apps/debugger/gui/team_window/TeamWindow.cpp b/src/apps/debugger/gui/team_window/TeamWindow.cpp index 630f5925a3..c5678d3c57 100644 --- a/src/apps/debugger/gui/team_window/TeamWindow.cpp +++ b/src/apps/debugger/gui/team_window/TeamWindow.cpp @@ -527,6 +527,14 @@ TeamWindow::_SetActiveSourceCode(SourceCode* sourceCode) fActiveSourceCode->AddReference(); fSourceView->SetSourceCode(fActiveSourceCode); + + // Scroll to the active function, if it doesn't match the stack frame (i.e. + // has been selected manually). + if (fActiveFunction != NULL && fActiveSourceCode != NULL + && (fActiveStackFrame == NULL + || fActiveStackFrame->Function() != fActiveFunction)) { + fSourceView->ScrollToAddress(fActiveFunction->Address()); + } }