Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
438
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
d1d84260
Commit
d1d84260
authored
10 months ago
by
Fatih Uzunoğlu
Committed by
Steve Lhomme
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
qml: drop indicator should wait until drop operation is completed in PlaylistListView
parent
f8b95a03
No related branches found
No related tags found
Loading
Pipeline
#455527
passed with warnings with stage
in 24 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/qt/playlist/qml/PlaylistListView.qml
+10
-8
10 additions, 8 deletions
modules/gui/qt/playlist/qml/PlaylistListView.qml
with
10 additions
and
8 deletions
modules/gui/qt/playlist/qml/PlaylistListView.qml
+
10
−
8
View file @
d1d84260
...
...
@@ -84,19 +84,16 @@ T.Pane {
// NOTE: Move implementation.
if
(
dragItem
===
item
)
{
model
.
moveItemsPre
(
root
.
selectionModel
.
sortedSelectedIndexesFlat
,
index
);
listView
.
forceActiveFocus
();
// NOTE: Dropping medialibrary content into the queue.
}
else
if
(
Helpers
.
isValidInstanceOf
(
item
,
Widgets
.
DragItem
))
{
item
.
getSelectedInputItem
()
.
then
((
inputItems
)
=>
{
return
item
.
getSelectedInputItem
().
then
((
inputItems
)
=>
{
if
(
!
Array
.
isArray
(
inputItems
)
||
inputItems
.
length
===
0
)
{
console
.
warn
(
"
can't convert items to input items
"
);
return
}
MainPlaylistController
.
insert
(
index
,
inputItems
,
false
)
})
}).
then
(()
=>
{
listView
.
forceActiveFocus
();
})
// NOTE: Dropping an external item (i.e. filesystem) into the queue.
}
else
if
(
drop
.
hasUrls
)
{
const
urlList
=
[];
...
...
@@ -108,9 +105,10 @@ T.Pane {
// NOTE This is required otherwise backend may handle the drop as well yielding double addition.
drop
.
accept
(
Qt
.
IgnoreAction
);
listView
.
forceActiveFocus
();
}
listView
.
forceActiveFocus
()
;
return
Promise
.
resolve
()
}
Widgets.DragItem
{
...
...
@@ -338,7 +336,7 @@ T.Pane {
color
:
"
transparent
"
visible
:
(
root
.
model
.
count
===
0
&&
dropArea
.
containsDrag
)
visible
:
(
root
.
model
.
count
===
0
&&
(
dropArea
.
containsDrag
||
dropArea
.
dropOperationOngoing
)
)
opacity
:
0.8
...
...
@@ -358,6 +356,8 @@ T.Pane {
anchors.fill
:
parent
property
bool
dropOperationOngoing
:
false
onEntered
:
(
drag
)
=>
{
if
(
!
root
.
isDropAcceptable
(
drag
,
root
.
model
.
count
))
{
drag
.
accepted
=
false
...
...
@@ -366,7 +366,9 @@ T.Pane {
}
onDropped
:
(
drop
)
=>
{
dropOperationOngoing
=
true
root
.
acceptDrop
(
root
.
model
.
count
,
drop
)
.
then
(()
=>
{
dropOperationOngoing
=
false
})
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment