projects
/
enjoyable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove printf.
[enjoyable.git]
/
ConfigsController.m
diff --git
a/ConfigsController.m
b/ConfigsController.m
index
9693985
..
d0d8401
100644
(file)
--- a/
ConfigsController.m
+++ b/
ConfigsController.m
@@
-67,16
+67,11
@@
if (tableView.selectedRow == 0)
return;
if (tableView.selectedRow == 0)
return;
- Config *toRemove = _configs[tableView.selectedRow];
[_configs removeObjectAtIndex: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];
[tableView reloadData];
+ [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged];
+ [self activateConfig:_configs[0]];
+ [self save];
}
-(void)tableViewSelectionDidChange:(NSNotification *)notify {
}
-(void)tableViewSelectionDidChange:(NSNotification *)notify {
@@
-132,9
+127,12
@@
for (unsigned i = 0; i < storedConfigs.count; ++i) {
NSDictionary *entries = storedConfigs[i][@"entries"];
Config *config = newConfigs[i];
for (unsigned i = 0; i < storedConfigs.count; ++i) {
NSDictionary *entries = storedConfigs[i][@"entries"];
Config *config = newConfigs[i];
- for (id key in entries)
- config.entries[key] = [Target targetDeserialize:entries[key]
- withConfigs:newConfigs];
+ for (id key in entries) {
+ Target *target = [Target targetDeserialize:entries[key]
+ withConfigs:newConfigs];
+ if (target)
+ config.entries[key] = target;
+ }
}
if (newConfigs.count) {
}
if (newConfigs.count) {