diff --git a/MacPass/MPDocumentController.m b/MacPass/MPDocumentController.m index 77754dd2..95f34f99 100644 --- a/MacPass/MPDocumentController.m +++ b/MacPass/MPDocumentController.m @@ -31,6 +31,8 @@ #import "KeePassKit/KeePassKit.h" #import "KPKFormat+MPUTIDetection.h" +#import "NSApplication+MPAdditions.h" + @interface MPDocumentController () @property (strong) IBOutlet NSView *accessoryView; @@ -43,6 +45,14 @@ @implementation MPDocumentController +- (BOOL)hasEditedDocuments { + MPAppDelegate *delegate = NSApp.mp_delegate; + if(delegate.isTerminating) { + // store all open documents once?! + } + return [super hasEditedDocuments]; +} + - (void)beginOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)inTypes completionHandler:(void (^)(NSInteger))completionHandler { self.openPanel = openPanel; if(!self.accessoryView) {