From 4428373de5114f21696d3465b4abc06b89a19d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Berg?= Date: Tue, 30 Mar 2010 14:34:48 +0200 Subject: [PATCH] Make the prefs panel update all open document views on close. --- ApplicationController.m | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ApplicationController.m b/ApplicationController.m index 9a90c5a..e410edd 100644 --- a/ApplicationController.m +++ b/ApplicationController.m @@ -115,14 +115,23 @@ [[PBRepositoryDocumentController sharedDocumentController] openDocument:self]; } -- (void) windowWillClose: sender + +- (void) windowWillClose:(id)sender { - [firstResponder terminate: sender]; + if ([[[sender object] windowController] isKindOfClass:[PBPrefsWindowController class]] ) { + for (PBGitRepository * doc in [[PBRepositoryDocumentController sharedDocumentController] documents]) { + [[[doc windowForSheet] contentView] setNeedsDisplay:YES]; + } + } else { + [firstResponder terminate: sender]; + } } - (IBAction)openPreferencesWindow:(id)sender { - [[PBPrefsWindowController sharedPrefsWindowController] showWindow:nil]; + DBPrefsWindowController * prefsWindowController = [PBPrefsWindowController sharedPrefsWindowController]; + [[prefsWindowController window] setDelegate:self]; + [prefsWindowController showWindow:nil]; } - (IBAction)showAboutPanel:(id)sender