Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
f86df4da
Commit
f86df4da
authored
Sep 03, 2005
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes item ordering on drag'n'drop
parent
b8cad83f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+15
-12
No files found.
modules/gui/macosx/playlist.m
View file @
f86df4da
...
...
@@ -1651,7 +1651,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
/* Drag & Drop inside the playlist */
if
(
[[
o_pasteboard
types
]
containsObject
:
@"VLCPlaylistItemPboardType"
]
)
{
int
i_row
;
int
i_row
,
i_removed_from_node
=
0
;
unsigned
int
i
;
playlist_item_t
*
p_new_parent
,
*
p_item
=
NULL
;
NSArray
*
o_all_items
=
[
o_nodes_array
arrayByAddingObjectsFromArray
:
...
...
@@ -1666,7 +1666,11 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
/* Make sure the proposed parent is a node.
(This should never be true) */
if
(
p_new_parent
->
i_children
<
0
)
return
NO
;
if
(
p_new_parent
->
i_children
<
0
)
{
vlc_object_release
(
p_playlist
);
return
NO
;
}
for
(
i
=
0
;
i
<
[
o_all_items
count
];
i
++
)
{
...
...
@@ -1691,11 +1695,6 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
}
/* If we move the playing item in a different node or we move the
node containing the playing item in a different node, then stop
playback, or the playlist refuses to detach the item. */
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
// Acually detach the item from the old position
if
(
playlist_NodeRemoveItem
(
p_playlist
,
p_item
,
p_old_parent
)
==
...
...
@@ -1709,12 +1708,16 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
i_new_index
=
-
1
;
/* If we move the item in the same node, we need to take into
account that one item will be deleted */
else
if
((
p_new_parent
==
p_old_parent
&&
i_old_index
<
index
+
(
int
)
i
)
||
p_new_parent
==
p_playlist
->
p_general
||
index
==
0
)
i_new_index
=
index
+
i
;
else
i_new_index
=
index
+
i
+
1
;
{
if
((
p_new_parent
==
p_old_parent
&&
i_old_index
<
index
+
(
int
)
i
)
||
p_new_parent
==
p_playlist
->
p_general
)
{
i_removed_from_node
++
;
}
i_new_index
=
index
+
i
-
i_removed_from_node
;
}
// Reattach the item to the new position
playlist_NodeInsert
(
p_playlist
,
i_current_view
,
p_item
,
p_new_parent
,
i_new_index
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment