Save metadata defaults after an edit.

This commit is contained in:
Damiano Galassi committed 2016-07-29 14:18:54 +02:00
1 parent 1df5f50612
commit 2c79b36e41
2 files changed
+8 -3

No files matched your search

+6 -1
View File
@@ -134,6 +134,11 @@ static void *SBMetadataPrefsViewControllerContex = &SBMetadataPrefsViewControlle
#pragma mark - Format Token Field Delegate
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
{
[self save];
}
- (NSString *)tokenField:(NSTokenField *)tokenField displayStringForRepresentedObject:(id)representedObject
{
if ([representedObject rangeOfString: @"{"].location == 0) {
@@ -155,7 +160,7 @@ static void *SBMetadataPrefsViewControllerContex = &SBMetadataPrefsViewControlle
- (id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString
{
return editingString;
return nil;
}
- (NSArray *)tokenField:(NSTokenField *)tokenField completionsForSubstring:(NSString *)substring indexOfToken:(NSInteger)tokenIndex