diff options
-rw-r--r-- | macosx/HBAppDelegate.m | 2 | ||||
-rw-r--r-- | macosx/HBOutputPanelController.h | 1 | ||||
-rw-r--r-- | macosx/HBOutputPanelController.m | 13 |
3 files changed, 9 insertions, 7 deletions
diff --git a/macosx/HBAppDelegate.m b/macosx/HBAppDelegate.m index b87a77b07..c28164a9e 100644 --- a/macosx/HBAppDelegate.m +++ b/macosx/HBAppDelegate.m @@ -418,7 +418,7 @@ */ - (IBAction)showOutputPanel:(id)sender { - [self.outputPanel showOutputPanel:sender]; + [self.outputPanel showWindow:sender]; } - (IBAction)showPicturePanel:(id)sender diff --git a/macosx/HBOutputPanelController.h b/macosx/HBOutputPanelController.h index 14ab72dee..38a9f867c 100644 --- a/macosx/HBOutputPanelController.h +++ b/macosx/HBOutputPanelController.h @@ -13,7 +13,6 @@ */ @interface HBOutputPanelController : NSWindowController -- (IBAction)showOutputPanel:(id)sender; - (IBAction)clearOutput:(id)sender; - (IBAction)copyAllOutputToPasteboard:(id)sender; - (IBAction)openActivityLogFile:(id)sender; diff --git a/macosx/HBOutputPanelController.m b/macosx/HBOutputPanelController.m index 8b6e955d7..c275c3970 100644 --- a/macosx/HBOutputPanelController.m +++ b/macosx/HBOutputPanelController.m @@ -114,7 +114,7 @@ /** * Loads output panel from OutputPanel.nib and shows it. */ -- (IBAction)showOutputPanel:(id)sender +- (IBAction)showWindow:(id)sender { if ([[self window] isVisible]) { @@ -122,10 +122,10 @@ } else { - [textView scrollRangeToVisible:NSMakeRange([outputTextStorage length], 0)]; - [self showWindow:sender]; + [textView scrollToEndOfDocument:self]; + [super showWindow:sender]; - [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"OutputPanelIsOpen"]; + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"OutputPanelIsOpen"]; } } @@ -209,7 +209,10 @@ if (outputTextStorage.length > TextStorageUpperSizeLimit) [outputTextStorage deleteCharactersInRange:NSMakeRange(0, [outputTextStorage length] - TextStorageLowerSizeLimit)]; - [textView scrollRangeToVisible:NSMakeRange([outputTextStorage length], 0)]; + if (self.window.isVisible) + { + [textView scrollToEndOfDocument:self]; + } FILE *f = fopen(_outputLogFile.fileSystemRepresentation, "a"); fprintf(f, "%s", text.UTF8String); |