Skip to content
Snippets Groups Projects
Commit a44b6c19 authored by Fatih Uzunoğlu's avatar Fatih Uzunoğlu
Browse files

qml: enable default transitions only when drag and drop is feasible in `ListViewExt`

I wanted to use the Component approach, with relying on the JS engine's garbage
collection, like I do in the scroll bar case (not creating the scroll bar when
the scroll bar is irrelevant) but it was not possible here. It seems that
Transition sets up the animations based on its parent, and I could not find
a "target" property in Transition.

Instead, I simply bind `enabled` of the transition to whether `acceptDropFunc`
is valid. Testing `acceptDropFunc` is a good practice when checking whether
the drag and drop is feasible in the view.

This fixes the problem of the initial items getting animated when media library
views load the (initial) items asynchronously. We don't want the initial items to
be animated. The playlist media library views are going to be still be affected
by this, as they support drag and drop and we want the transitions there, but
there is not much to do about that here.
parent 76165816
Branches 3.0.x
No related tags found
Loading
Pipeline #587122 passed with stage
in 13 minutes and 16 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment