[vlc-commits] commit: Qt: Playlist drag and drop corrections (Jakob Leben )

git at videolan.org git at videolan.org
Mon Mar 8 12:02:53 CET 2010


vlc | branch: master | Jakob Leben <jleben at videolan.org> | Mon Mar  8 11:56:45 2010 +0100| [4bd42ef61b011eeb2f016354df9767bd75a5e1df] | committer: Jakob Leben 

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4bd42ef61b011eeb2f016354df9767bd75a5e1df
---

 .../gui/qt4/components/playlist/playlist_item.cpp  |   19 +++
 .../gui/qt4/components/playlist/playlist_item.hpp  |    1 +
 .../gui/qt4/components/playlist/playlist_model.cpp |  151 +++++++++++++-------
 .../gui/qt4/components/playlist/playlist_model.hpp |    3 +
 modules/gui/qt4/components/playlist/selector.cpp   |   20 ++--
 5 files changed, 135 insertions(+), 59 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=4bd42ef61b011eeb2f016354df9767bd75a5e1df


More information about the vlc-commits mailing list