diff --git a/platform/osx/app/AppDelegate.m b/platform/osx/app/AppDelegate.m index 094260f8d..cae27b0c6 100644 --- a/platform/osx/app/AppDelegate.m +++ b/platform/osx/app/AppDelegate.m @@ -57,6 +57,14 @@ static NSString * const MGLDroppedPinAnnotationImageIdentifier = @"dropped"; andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; + + // Normally, an application should respect the “Close windows when quitting + // an application” setting in the General pane of System Preferences. But + // the map would only be restored to its last opened location if the user + // quits the application using Quit and Keep Windows. An application that + // displays only a map should restore the last viewed map, like Maps.app + // does. + [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"NSQuitAlwaysKeepsWindows"]; } - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {