Cocoa Port: Fix a GUI bug where adding or removing an input mapping in Input Preferences may occasionally cause its outline view to fail to update under certain OS/build combinations.
- I solved it by simply reloading the entire outline view instead of picking and choosing specific items to reload. Due to the relatively few amount of items in the outline view (less than 1000 items), reloading the entire outline view is still very fast, even on a PowerPC Mac.
This commit is contained in:
parent
ed52d0e093
commit
1490a19ad1
|
@ -324,15 +324,7 @@
|
|||
[inputPrefOutlineView deselectRow:rowNumber];
|
||||
}
|
||||
|
||||
// Update all expanded command tags.
|
||||
for (NSString *tag in inputMappings)
|
||||
{
|
||||
NSArray *inputList = (NSArray *)[inputMappings valueForKey:tag];
|
||||
if ([inputPrefOutlineView isItemExpanded:inputList])
|
||||
{
|
||||
[inputPrefOutlineView reloadItem:inputList reloadChildren:YES];
|
||||
}
|
||||
}
|
||||
[inputPrefOutlineView reloadItem:nil reloadChildren:YES];
|
||||
|
||||
[self setConfigInputTargetID:nil];
|
||||
|
||||
|
@ -793,7 +785,7 @@
|
|||
[inputManager removeMappingUsingDeviceCode:[(NSString *)[deviceInfo valueForKey:@"deviceCode"] cStringUsingEncoding:NSUTF8StringEncoding] elementCode:[(NSString *)[deviceInfo valueForKey:@"elementCode"] cStringUsingEncoding:NSUTF8StringEncoding]];
|
||||
[inputManager writeDefaultsInputMappings];
|
||||
|
||||
[outlineView reloadItem:inputList reloadChildren:YES];
|
||||
[outlineView reloadItem:nil reloadChildren:YES];
|
||||
|
||||
// If we're dealing with a Microphone command, update the audio file generators list.
|
||||
if ([[inputManager commandTagFromInputList:inputList] isEqualToString:@"Microphone"])
|
||||
|
|
Loading…
Reference in New Issue