|
@@ -930,7 +930,7 @@
|
|
|
NSNumber *sizeString = [textNote.font.fontDescriptor objectForKey:NSFontSizeAttribute];
|
|
|
self.fontSizeVC.stringValue = [NSString stringWithFormat:@"%@pt",sizeString.stringValue];
|
|
|
|
|
|
- NSDictionary *model = [self freeTextPropertWithTitle:self.defaultPopUpButton.title];
|
|
|
+ NSDictionary *model = [self freeTextPropertWithTitle:self.defaultPopUpButton.indexOfSelectedItem];
|
|
|
if (model) {
|
|
|
NSArray *modelFontNames = [model[@"fontName"] componentsSeparatedByString:@"-"];
|
|
|
if ([self.fontStyleVC.stringValue isEqualToString:@"Regular"] && (modelFontNames.count == 1)) {
|
|
@@ -1040,7 +1040,7 @@
|
|
|
NSNumber *sizeString = [textNote.font.fontDescriptor objectForKey:NSFontSizeAttribute];
|
|
|
self.fontSizeVC.stringValue = [NSString stringWithFormat:@"%@pt",sizeString.stringValue];
|
|
|
|
|
|
- NSDictionary *model = [self freeTextPropertWithTitle:self.defaultPopUpButton.title];
|
|
|
+ NSDictionary *model = [self freeTextPropertWithTitle:self.defaultPopUpButton.indexOfSelectedItem];
|
|
|
if (model) {
|
|
|
NSArray *modelFontNames = [model[@"fontName"] componentsSeparatedByString:@"-"];
|
|
|
if ([self.fontStyleVC.stringValue isEqualToString:@"Regular"] && (modelFontNames.count == 1)) {
|
|
@@ -1155,7 +1155,7 @@
|
|
|
NSNumber *sizeString = [currentFont.fontDescriptor objectForKey:NSFontSizeAttribute];
|
|
|
self.fontSizeVC.stringValue = [NSString stringWithFormat:@"%@pt",sizeString.stringValue];
|
|
|
|
|
|
- NSDictionary *model = [self freeTextPropertWithTitle:self.defaultPopUpButton.title];
|
|
|
+ NSDictionary *model = [self freeTextPropertWithTitle:self.defaultPopUpButton.indexOfSelectedItem];
|
|
|
if (model) {
|
|
|
NSArray *modelFontNames = [model[@"fontName"] componentsSeparatedByString:@"-"];
|
|
|
if ([self.fontStyleVC.stringValue isEqualToString:@"Regular"] && (modelFontNames.count == 1)) {
|
|
@@ -1320,24 +1320,25 @@
|
|
|
self.generalImageView.image = [self.annotationModel annotationImage];
|
|
|
}
|
|
|
|
|
|
-- (NSDictionary *)freeTextPropertWithTitle:(NSString *)string {
|
|
|
+- (NSDictionary *)freeTextPropertWithTitle:(NSInteger)integer {
|
|
|
NSDictionary *model;
|
|
|
NSArray *array = [CPDFAnnotationModel defaultFreeTextPropert];
|
|
|
- if ([string isEqualToString:@"Customize"]) {
|
|
|
- model = [array objectAtIndex:0];
|
|
|
- } else if ([string isEqualToString:@"H1 Headline"]) {
|
|
|
- model = [array objectAtIndex:1];
|
|
|
- } else if ([string isEqualToString:@"H2 Title"]) {
|
|
|
- model = [array objectAtIndex:2];
|
|
|
- } else if ([string isEqualToString:@"H3 Subtitle"]) {
|
|
|
- model = [array objectAtIndex:3];
|
|
|
- } else if ([string isEqualToString:@"B1 Text"]) {
|
|
|
- model = [array objectAtIndex:4];
|
|
|
- } else if ([string isEqualToString:@"B2 Small Text"]) {
|
|
|
- model = [array objectAtIndex:5];
|
|
|
- } else if ([string isEqualToString:@"B3 Describtion"]) {
|
|
|
- model = [array objectAtIndex:6];
|
|
|
- }
|
|
|
+// if ([string isEqualToString:@"Customize"]) {
|
|
|
+// model = [array objectAtIndex:0];
|
|
|
+// } else if ([string isEqualToString:@"H1 Headline"]) {
|
|
|
+// model = [array objectAtIndex:1];
|
|
|
+// } else if ([string isEqualToString:@"H2 Title"]) {
|
|
|
+// model = [array objectAtIndex:2];
|
|
|
+// } else if ([string isEqualToString:@"H3 Subtitle"]) {
|
|
|
+// model = [array objectAtIndex:3];
|
|
|
+// } else if ([string isEqualToString:@"B1 Text"]) {
|
|
|
+// model = [array objectAtIndex:4];
|
|
|
+// } else if ([string isEqualToString:@"B2 Small Text"]) {
|
|
|
+// model = [array objectAtIndex:5];
|
|
|
+// } else if ([string isEqualToString:@"B3 Describtion"]) {
|
|
|
+// model = [array objectAtIndex:6];
|
|
|
+// }
|
|
|
+ model = [array objectAtIndex:integer];
|
|
|
return model;
|
|
|
}
|
|
|
|