using class properties

This commit is contained in:
michael starke
2017-09-03 09:44:06 +02:00
parent eb171a80f8
commit a6f6cb7ca9

View File

@@ -619,8 +619,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
} }
[newEntry addToGroup:parent]; [newEntry addToGroup:parent];
[newEntry.undoManager setActionName:NSLocalizedString(@"ADD_ENTRY", "")]; [newEntry.undoManager setActionName:NSLocalizedString(@"ADD_ENTRY", "")];
NSDictionary *userInfo = @{ MPDocumentEntryKey: newEntry }; [NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidAddEntryNotification
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddEntryNotification object:self userInfo:userInfo]; object:self
userInfo:@{ MPDocumentEntryKey: newEntry }];
return newEntry; return newEntry;
} }
@@ -643,8 +644,9 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
} }
[newGroup addToGroup:parent]; [newGroup addToGroup:parent];
[newGroup.undoManager setActionName:NSLocalizedString(@"ADD_GROUP", "")]; [newGroup.undoManager setActionName:NSLocalizedString(@"ADD_GROUP", "")];
NSDictionary *userInfo = @{ MPDocumentGroupKey : newGroup }; [NSNotificationCenter.defaultCenter postNotificationName:MPDocumentDidAddGroupNotification
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidAddGroupNotification object:self userInfo:userInfo]; object:self
userInfo:@{ MPDocumentGroupKey : newGroup }];
return newGroup; return newGroup;
} }