]> git.sesse.net Git - vlc/commit
Qt: Playlist drag and drop corrections
authorJakob Leben <jleben@videolan.org>
Mon, 8 Mar 2010 10:56:45 +0000 (11:56 +0100)
committerJakob Leben <jleben@videolan.org>
Mon, 8 Mar 2010 10:56:45 +0000 (11:56 +0100)
commit4bd42ef61b011eeb2f016354df9767bd75a5e1df
treed4a63ded571e72b37616bde89dce96385de5368e
parent3968fd2daf7f24dbd4e654268ffa1c8fd3d75b80
Qt: Playlist drag and drop corrections

- Use item ids instead of pointers for drag data to prevent usage after freeing.
- The list of selected items that contitutes drag data is sorted correctly according to item position in tree. This keeps their relative order after drop operation even if they originated from different parent nodes.
- If a parent and any of it's children are selected, only the parent enters drag'n'drop operation. Children are thus not moved out of the parent when dropping.
- Copying by drag and drop performs a recursive copy of all children.
modules/gui/qt4/components/playlist/playlist_item.cpp
modules/gui/qt4/components/playlist/playlist_item.hpp
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/components/playlist/playlist_model.hpp
modules/gui/qt4/components/playlist/selector.cpp