Merge pull request #12 from svgol/save_new_in_recent

* save just created projects to the list of recent documents
This commit is contained in:
Riccardo 2021-02-17 23:09:42 +01:00 committed by GitHub
commit 80d0c2575e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -817,7 +817,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
NSString *filePath; NSString *filePath;
NSString *projectType; NSString *projectType;
PCProject *project; PCProject *project;
NSString *projectPath;
[self createProjectTypeAccessaryView]; [self createProjectTypeAccessaryView];
@ -858,7 +858,9 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
return; return;
} }
[loadedProjects setObject:project forKey: [project projectPath]]; projectPath = [project projectPath];
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:projectPath]];
[loadedProjects setObject:project forKey:projectPath];
[self setActiveProject:project]; [self setActiveProject:project];
[[project projectWindow] orderFront:self]; [[project projectWindow] orderFront:self];
} }