Bug 291068

Summary: dropping on collection browser entries triggers organize collection
Product: [Applications] amarok Reporter: Bart Cerneels <bart.cerneels>
Component: Collection BrowserAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.5-git   
Target Milestone: 2.6   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In: 2.6
Sentry Crash Report:

Description Bart Cerneels 2012-01-09 17:38:07 UTC
Version:           2.5-git
OS:                Linux





Reproducible: Always

Steps to Reproduce:
drop an album on another album or artist.

Actual Results:  
Organize collection comes up.

Expected Results:  
Organized collection dialog should not pop up.
Comment 1 Bart Cerneels 2012-02-01 07:07:11 UTC
Git commit 8d103cf35705690d17f8f9437618868e2cbb98b3 by Bart Cerneels.
Committed on 31/01/2012 at 13:41.
Pushed by shanachie into branch 'master'.

Don't accept drops on non-collectionheader items.

Caused the copy dialog to come up.
FIXED-IN: 2.6

M  +2    -0    ChangeLog
M  +6    -2    src/browsers/CollectionTreeItemModel.cpp

http://commits.kde.org/amarok/8d103cf35705690d17f8f9437618868e2cbb98b3
Comment 2 Matěj Laitl 2012-02-07 12:11:06 UTC
Git commit 8a90627d3f25363ff9795b72b414c9c8c0498dba by Matěj Laitl.
Committed on 03/02/2012 at 12:23.
Pushed by laitl into branch 'master'.

Another approach to fix bug 291068, be more permissive

Bart originally solved the bug by enabling track dropping only
precisely on root collection rows. This is IMO too much restrictive
as it prevents you to drag tracks between 2 large expanded collections
without excessive scrolling. (something I would miss) Additionally,
there was no visual indication that the drop will not be performed.

This is my try to rework it in a way that:
 * keeps drops onto artists/albums (whatever you first level
   entity in collection browser is) allowed. There is a drop indicator
   that clearly shows that the drop will go _between_ the entities, not
   to them.
 * disables drops to read-only collections
 * disabled drops are indicated visually using the not-allowed mouse
   cursor (the tricky part, but commented well in code)

Some more code comments not present in review request are added.
REVIEW: 103856
DIGEST: More natural drag'n'drop behaviour in collection browser

M  +2    -2    ChangeLog
M  +24   -12   src/browsers/CollectionTreeItemModel.cpp
M  +6    -0    src/browsers/CollectionTreeItemModelBase.cpp
M  +12   -0    src/browsers/CollectionTreeItemModelBase.h
M  +19   -0    src/browsers/CollectionTreeView.cpp
M  +1    -0    src/browsers/CollectionTreeView.h

http://commits.kde.org/amarok/8a90627d3f25363ff9795b72b414c9c8c0498dba