Show custom attribute key when copied into clipboard

This commit is contained in:
michael starke
2017-11-14 18:52:31 +01:00
parent adcd80b2ab
commit 4d4d611dd4
5 changed files with 27 additions and 2 deletions

View File

@@ -577,6 +577,12 @@ typedef NS_ENUM(NSUInteger, MPEntryTab) {
else if(textField == self.titleTextField) {
name = NSLocalizedString(@"TITLE", "Displayed name when title field was copied");
}
else {
NSInteger index = MPCustomFieldIndexFromTag(textField.tag);
if(index > -1) {
name = [_customFieldsController.arrangedObjects[index] key];
}
}
[[MPPasteBoardController defaultController] copyObjects:@[value] overlayInfo:info name:name atView:self.view];
return NO;
}