Commit 72934aec authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

MacOSX/Framework: Fix grouped event sending, and remove a debugging assert that isn't true anymore.

parent c1c79c58
......@@ -117,7 +117,6 @@ static void * EventDispatcherMainLoop(void * user_data)
[message_newer->target release];
[message_newer->u.object release];
[[self messageQueue] removeObjectAtIndex: i];
i++;
continue;
}
/* It should be a good idea not to collapse event, with other kind of event in-between
......
......@@ -300,14 +300,11 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
int end = [[[arrayOfArgs objectAtIndex: [arrayOfArgs count]-1] objectForKey:@"index"] intValue];
NSRange range = NSMakeRange(start, end-start);
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndexesInRange:range] forKey:@"media"];
int i = [[[arrayOfArgs objectAtIndex: 0] objectForKey:@"index"] intValue];
[arrayOfArgs retain];
for( NSDictionary * args in arrayOfArgs )
{
int index = [[args objectForKey:@"index"] intValue];
VLCMedia * media = [args objectForKey:@"media"];
/* Sanity check */
NSAssert( i == index, @"Expects some troubles, inserted items are not in a range" ); i++;
if( index && index >= [cachedMedia count] )
index = [cachedMedia count] - 1;
[cachedMedia insertObject:media atIndex:index];
......
......@@ -256,7 +256,6 @@ static void HandleMediaListViewItemDeleted( const libvlc_event_t * event, void *
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndexesInRange:range] forKey:@"media"];
[self willChange:NSKeyValueChangeInsertion valuesAtIndexes:[NSIndexSet indexSetWithIndexesInRange:range] forKey:@"node"];
int i = [[[arrayOfArgs objectAtIndex: 0] objectForKey:@"index"] intValue];
for( NSDictionary * args in arrayOfArgs )
{
int index = [[args objectForKey:@"index"] intValue];
......@@ -265,7 +264,6 @@ static void HandleMediaListViewItemDeleted( const libvlc_event_t * event, void *
[node setMedia:media];
[node setChildren:[self childrenAtIndex:index]];
/* Sanity check */
NSAssert( i == index, @"Expects some troubles, inserted items are not in a range" ); i++;
if( index && index >= [cachedNode count] )
index = [cachedNode count] - 1;
[cachedNode insertObject:node atIndex:index];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment