for child options, update the name when updating the keypath so it matches the bookmark data.

This commit is contained in:
Kelvin Sherlock 2021-06-13 17:17:20 -04:00
parent 681c70d515
commit cae68c7f5a
1 changed files with 5 additions and 1 deletions

View File

@ -163,6 +163,7 @@ static NSDictionary *IndexMap = nil;
} }
// special case for child options since _name is incorrect. // special case for child options since _name is incorrect.
// _name is :rs232. should be set to -sl3:ssc:rs232 :/ // _name is :rs232. should be set to -sl3:ssc:rs232 :/
#if 0
if (!_title) { if (!_title) {
BOOL found = NO; BOOL found = NO;
@ -180,7 +181,7 @@ static NSDictionary *IndexMap = nil;
} }
return; return;
} }
#endif
NSString *value = [dict objectForKey: _name]; NSString *value = [dict objectForKey: _name];
if (!value) { if (!value) {
@ -263,6 +264,9 @@ static NSDictionary *IndexMap = nil;
for (SlotOption *o in _options) { for (SlotOption *o in _options) {
[o setKeyPath: p]; [o setKeyPath: p];
} }
// set up child name so bookmarks work.
if (c == ':') _name = p;
} }