X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=TargetController.m;h=7a4fd058e470d6238dd5b285d3a03770129e0c41;hp=86fe9688aaa21d029a125c90d635026b673d6119;hb=44a44209d4ce26fb30102014d7040975aea51f93;hpb=32ca88087708a8b1f7e65ecbea6c5fd6690431d3 diff --git a/TargetController.m b/TargetController.m index 86fe968..7a4fd05 100644 --- a/TargetController.m +++ b/TargetController.m @@ -175,8 +175,13 @@ keyInput.vk = [(TargetKeyboard*)target vk]; } else if ([target isKindOfClass:[TargetConfig class]]) { [radioButtons selectCellAtRow:2 column:0]; - [configPopup selectItemAtIndex:[configsController.configs - indexOfObject:[(TargetConfig *)target config]]]; + NSUInteger idx = [configsController.configs + indexOfObject:[(TargetConfig *)target config]]; + if (idx == NSNotFound) { + [radioButtons selectCellAtRow:self.enabled ? 0 : -1 column:0]; + [configPopup selectItemAtIndex:-1]; + } else + [configPopup selectItemAtIndex:idx]; } else if ([target isKindOfClass:[TargetMouseMove class]]) { [radioButtons selectCellAtRow:3 column:0];