fixed #158 Newly created entries now get the default username correctly set

This commit is contained in:
michael starke
2014-03-18 02:55:11 +01:00
parent 2370347e9a
commit b31ea34c36

View File

@@ -433,7 +433,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey
KPKEntry *newEntry = [self.tree createEntry:parent]; KPKEntry *newEntry = [self.tree createEntry:parent];
newEntry.title = NSLocalizedString(@"DEFAULT_ENTRY_TITLE", @"Title for a newly created entry"); newEntry.title = NSLocalizedString(@"DEFAULT_ENTRY_TITLE", @"Title for a newly created entry");
if([self.tree.metaData.defaultUserName length] > 0) { if([self.tree.metaData.defaultUserName length] > 0) {
newEntry.title = self.tree.metaData.defaultUserName; newEntry.username = self.tree.metaData.defaultUserName;
} }
[parent addEntry:newEntry]; [parent addEntry:newEntry];
[parent.undoManager setActionName:NSLocalizedString(@"ADD_ENTRY", "")]; [parent.undoManager setActionName:NSLocalizedString(@"ADD_ENTRY", "")];