[vlc-commits] macosx: adapt recursiveExpandNode to new playlist model

David Fuhrmann git at videolan.org
Tue Dec 30 16:12:00 CET 2014


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Dec  7 14:25:39 2014 +0100| [ff0e7068eb399a5af880dfb336cd83a6e40bc486] | committer: David Fuhrmann

macosx: adapt recursiveExpandNode to new playlist model

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ff0e7068eb399a5af880dfb336cd83a6e40bc486
---

 modules/gui/macosx/playlist.m |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index a1fd1c8..795a1b2 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -854,15 +854,13 @@
     playlist_item_t *p_item;
     for (NSUInteger i = 0; i < count; i++) {
         o_item = [o_outline_view itemAtRow: indexes[i]];
-        p_item = (playlist_item_t *)[o_item pointerValue];
-
-        if (![[o_outline_view dataSource] outlineView: o_outline_view isItemExpandable: o_item])
-            o_item = [o_outline_dict objectForKey: [NSString stringWithFormat: @"%p", p_item->p_parent]];
 
         /* We need to collapse the node first, since OSX refuses to recursively
          expand an already expanded node, even if children nodes are collapsed. */
-        [o_outline_view collapseItem: o_item collapseChildren: YES];
-        [o_outline_view expandItem: o_item expandChildren: YES];
+        if ([o_outline_view isExpandable:o_item]) {
+            [o_outline_view collapseItem: o_item collapseChildren: YES];
+            [o_outline_view expandItem: o_item expandChildren: YES];
+        }
 
         selectedRows = [o_outline_view selectedRowIndexes];
         [selectedRows getIndexes:indexes maxCount:count inIndexRange:nil];



More information about the vlc-commits mailing list