Skip to content

Commit

Permalink
Merge branch 'master' into 1.6
Browse files Browse the repository at this point in the history
# Conflicts:
#	Source/MIKMIDISequence.m
  • Loading branch information
Andrew Madsen committed Mar 21, 2016
2 parents b3a5eaa + 8ea5afe commit 5cb5aff
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 102 deletions.
18 changes: 8 additions & 10 deletions Source/MIKMIDIDeviceManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,10 @@ - (NSArray *)virtualSources { return [self.internalVirtualSources copy]; }

- (void)addInternalVirtualSourcesObject:(MIKMIDISourceEndpoint *)source
{
NSUInteger index = [self.internalVirtualSources indexOfObject:source];
if (index == NSNotFound) return;
[self willChange:NSKeyValueChangeRemoval valuesAtIndexes:[NSIndexSet indexSetWithIndex:index] forKey:@"virtualSources"];
[self.internalVirtualSources removeObjectAtIndex:index];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:[NSIndexSet indexSetWithIndex:index] forKey:@"virtualSources"];
NSUInteger index = [self.internalVirtualSources count];
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:index] forKey:@"virtualSources"];
[self.internalVirtualSources insertObject:source atIndex:index];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:index] forKey:@"virtualSources"];
}

- (void)removeInternalVirtualSourcesObject:(MIKMIDISourceEndpoint *)source
Expand All @@ -403,11 +402,10 @@ - (NSArray *)virtualDestinations { return [self.internalVirtualDestinations copy

- (void)addInternalVirtualDestinationsObject:(MIKMIDIDestinationEndpoint *)destination
{
NSUInteger index = [self.internalVirtualDestinations indexOfObject:destination];
if (index == NSNotFound) return;
[self willChange:NSKeyValueChangeRemoval valuesAtIndexes:[NSIndexSet indexSetWithIndex:index] forKey:@"virtualDestinations"];
[self.internalVirtualDestinations removeObjectAtIndex:index];
[self didChange:NSKeyValueChangeRemoval valuesAtIndexes:[NSIndexSet indexSetWithIndex:index] forKey:@"virtualDestinations"];
NSUInteger index = [self.internalVirtualDestinations count];
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:index] forKey:@"virtualDestinations"];
[self.internalVirtualDestinations insertObject:destination atIndex:index];
[self didChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndex:index] forKey:@"virtualDestinations"];
}

- (void)removeInternalVirtualDestinationsObject:(MIKMIDIDestinationEndpoint *)destination
Expand Down
Loading

0 comments on commit 5cb5aff

Please sign in to comment.