From 46917874ad76c284c119a7c6b6047e3a88a69829 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 1 Dec 2008 16:58:42 -0500 Subject: [PATCH] Fix a couple display issues and a crash * Source/DebuggerController.m: (resetDisplays): Clear all the items in the stackController.stack (updateSourceViewer): If the selection is empty, do not try to clear it. Also, tell the textView to repaint. --- Source/DebuggerController.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index 28f90a0..c4265ef 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -108,6 +108,7 @@ - (void)resetDisplays { [registerController setContent:nil]; + [stackController.stack removeAllObjects]; [[sourceViewer textView] setString:@""]; } @@ -241,7 +242,6 @@ id selection = [stackArrayController selection]; if ([selection valueForKey:@"filename"] == NSNoSelectionMarker) { - [[sourceViewer textView] setString:@""]; return; } @@ -253,12 +253,15 @@ return; } - [sourceViewer setFile:filename]; + if (![sourceViewer.file isEqualToString:filename]) + [sourceViewer setFile:filename]; int line = [[selection valueForKey:@"lineNumber"] intValue]; [sourceViewer setMarkedLine:line]; [sourceViewer scrollToLine:line]; + [[sourceViewer textView] display]; + // make sure the font stays Monaco //[sourceViewer setFont:[NSFont fontWithName:@"Monaco" size:10.0]]; } -- 2.43.5