[vlc-commits] macosx: prevent items from moving from the ml to the pl accidently

Felix Paul Kühne git at videolan.org
Thu Feb 16 21:22:54 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Feb 16 21:22:51 2012 +0100| [04c6044391727cf9567ffbcc3c25fa7e8ad8a91f] | committer: Felix Paul Kühne

macosx: prevent items from moving from the ml to the pl accidently

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

 modules/gui/macosx/playlist.m |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index dd9fc0c..ce217e7 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1553,10 +1553,17 @@
         NSArray *o_all_items = [o_nodes_array arrayByAddingObjectsFromArray:
                                                                 o_items_array];
         /* If the item is to be dropped as root item of the outline, make it a
-           child of the General node.
+           child of the respective general node, if is either the pl or the ml
            Else, choose the proposed parent as parent. */
-        if( item == nil ) p_new_parent = p_playlist->p_local_category;
-        else p_new_parent = [item pointerValue];
+        if( item == nil )
+        {
+            if ([self currentPlaylistRoot] == p_playlist->p_local_category || [self currentPlaylistRoot] == p_playlist->p_ml_category) 
+                p_new_parent = [self currentPlaylistRoot];
+            else
+                p_new_parent = p_playlist->p_local_category;
+        }
+        else
+            p_new_parent = [item pointerValue];
 
         /* Make sure the proposed parent is a node.
            (This should never be true) */



More information about the vlc-commits mailing list