From 5c831ac995274e31a074aa14b9364c3e2c155e33 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 10 Jan 2008 16:10:17 -0800 Subject: [PATCH] We were previously using, for the stack table, the index of the row to determine which source file to show instead of the "level" column of the row, which means sorting the stack table would screw things up * Source/DebuggerWindowController.m: ([DebuggerWindowController updateSourceViewer]): Switch to using the selected item's "level" rather than the selected row index --- Source/DebuggerWindowController.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/DebuggerWindowController.m b/Source/DebuggerWindowController.m index 680689b..a0b19be 100644 --- a/Source/DebuggerWindowController.m +++ b/Source/DebuggerWindowController.m @@ -214,12 +214,13 @@ */ - (void)updateSourceViewer { - int selection = [stackController selectionIndex]; - if (selection == NSNotFound) + id selectedLevel = [[stackController selection] valueForKey:@"level"]; + if (selectedLevel == NSNoSelectionMarker) { [sourceViewer setString:@""]; return; } + int selection = [selectedLevel intValue]; // get the filename and then set the text NSString *filename = [[stack objectAtIndex:selection] valueForKey:@"filename"]; -- 2.22.5