Skip to content
Snippets Groups Projects

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

Merged Fatih Uzunoğlu requested to merge fuzun/vlc:qt/transitionwhendndisfeasible into master

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.

Request review @chub.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading