X-Git-Url: https://git.yukkurigames.com/?a=blobdiff_plain;f=Classes%2FNJOutputController.m;h=0bb335f003cc38e12a7897121e44207811fe4f25;hb=52fbe3168fcb8237252bdc2a723c08eb7c1a8741;hp=cbb48f7e1cab1a145ef98825de82ecd5ec470cbc;hpb=9d7f100f57dded88fa998a86715a919ca471c3db;p=enjoyable.git diff --git a/Classes/NJOutputController.m b/Classes/NJOutputController.m index cbb48f7..0bb335f 100644 --- a/Classes/NJOutputController.m +++ b/Classes/NJOutputController.m @@ -29,6 +29,11 @@ selector:@selector(mappingListDidChange:) name:NJEventMappingListChanged object:nil]; + [NSNotificationCenter.defaultCenter + addObserver:self + selector:@selector(mappingDidChange:) + name:NJEventMappingChanged + object:nil]; } return self; } @@ -275,7 +280,7 @@ } - (void)mappingListDidChange:(NSNotification *)note { - NSArray *mappings = note.object; + NSArray *mappings = note.userInfo[NJMappingListKey]; NJMapping *current = mappingPopup.selectedItem.representedObject; [mappingPopup.menu removeAllItems]; for (NJMapping *mapping in mappings) { @@ -289,4 +294,8 @@ [mappingPopup selectItemWithRepresentedObject:current]; } +- (void)mappingDidChange:(NSNotification *)note { + [self loadCurrent]; +} + @end