[osx] Persist viewpoint across relaunch

This commit is contained in:
Minh Nguyễn
2015-12-05 22:24:02 -08:00
committed by Minh Nguyễn
parent 0fb2b855a4
commit b869d3c820

View File

@@ -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 {