if (tableView.selectedRow == 0)
return;
- Config *toRemove = _configs[tableView.selectedRow];
[_configs removeObjectAtIndex:tableView.selectedRow];
-
- if (toRemove == _currentConfig)
- _currentConfig = _configs[0];
- if (toRemove == manualConfig)
- manualConfig = _configs[0];
-
- [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged];
[tableView reloadData];
+ [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged];
+ [self activateConfig:_configs[0]];
[self save];
}
}
- (void)refreshConfigs {
- // TODO: This doesn't work when removing configs.
NSInteger initialIndex = configPopup.indexOfSelectedItem;
[configPopup.menu removeAllItems];
for (Config *config in configsController.configs) {