Bug 256252 - assign Tag with Drag and Drop doesnt work since Version 1.2.0
Summary: assign Tag with Drag and Drop doesnt work since Version 1.2.0
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Drag&Drop (show other bugs)
Version: 1.4.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-06 19:48 UTC by Martin
Modified: 2017-08-02 17:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2010-11-06 19:48:45 UTC
Version:           1.4.0 (using KDE 4.5.1) 
OS:                Linux

In older versions until 1.1.0 i drag one or more photos over a Tag. Then came a Context-menue with the Entry "assign Tag "my Tags/example" to the entries" and the fotos assign with this tag. 

In the newer versions nothing happend when i drag photos over a tag. 

Reproducible: Always

Steps to Reproduce:
activate the Tag-tree
mark one ore more photos.
drag the photos over a tag.


Actual Results:  
nothing happens

Expected Results:  
like the versions until 1.1.0 a menue pop-up with the entry "assign tag to the entries" and assign the tag to the photos
Comment 1 caulier.gilles 2010-11-13 22:30:25 UTC
I think this behavior have been fixed with recent version. Can you test using last digiKam 1.5.0 ?

Gilles Caulier
Comment 2 Andi Clemens 2010-11-15 00:08:20 UTC
Where exactly are you dragging the photos to? It works when dragging a tag from the "Tag filter" oder "caption/tags" bar on the right onto a photo (or a group of selected photos).

I can't remember it worked the other way around...

Gilles,
do you remember if it worked the opposite way?
If so, the bug is still present in SVN.

Andi
Comment 3 caulier.gilles 2010-11-15 17:09:36 UTC
I just tested all D&D features under my MacBook, with last code from svn trunk: 
The components are listed below:

I just tested all D&D features under my MacBook, with last code from svn trunk: 

The components are listed below:
--------------------------------

From Left side bar:

1) -> Album tree-view
2) -> Tags tree-view

From central view:

3) -> Album icon-view
4) -> Image Preview canvas
5) -> Preview Mode Thumbbar

From Right side bar:

6) -> Tags tree-view from Caption & Tags
7) -> Tags tree-view from Tags Filters

From other windows:

8) -> Thumbbar from IE
9) -> Thumbbar from LT
10) -> Items list view from BQM
11) -> IE canvas
12) -> LT canvas

Tags D&D operations from source to target :
-------------------------------------------

1) => 6) : Don't work : expected result: tag must be applied to whole album items
6) => 1) : Don't work : expected result: tag must be applied to whole album items

1) => 7) : Don't work : expected result: tag must be applied to whole album items
7) => 1) : Don't work : expected result: tag must be applied to whole album items

3) => 6) : Don't work : expected result: tag must be applied to items selected
6) => 3) : work fine

3) => 7) : Don't work : expected result: tag must be applied to items selected
7) => 3) : work fine

5) => 6) : Don't work : expected result: tag must be applied to items selected
5) => 7) : Don't work : expected result: tag must be applied to items selected

6) => 5) : work fine
7) => 5) : work fine

6) => 4) : Don't work : expected result: tag must be applied to item
7) => 4) : Don't work : expected result: tag must be applied to item

6) => 11) : Don't work : expected result: tag must be applied to item
7) => 11) : Don't work : expected result: tag must be applied to item

6) => 12) : Don't work : expected result: tag must be applied to item (crash!)
7) => 12) : Don't work : expected result: tag must be applied to item (crash!)

8) => 2) : Don't work : expected result: tag must be applied to item
8) => 6) : Don't work : expected result: tag must be applied to item
8) => 7) : Don't work : expected result: tag must be applied to item

9) => 2) : Don't work : expected result: tag must be applied to item
9) => 6) : Don't work : expected result: tag must be applied to item
9) => 7) : Don't work : expected result: tag must be applied to item

10) => 2) : Don't work : expected result: tag must be applied to item
10) => 6) : Don't work : expected result: tag must be applied to item
10) => 7) : Don't work : expected result: tag must be applied to item

Special actions:

* yes, you can D&D between this view to let's mouse over sidebar button :

1) => 2) : Don't work : expected result: tag must be applied to whole album items
2) => 1) : Don't work : expected result: tag must be applied to whole album items

6) => 7) : Work fine (tag move)
7) => 6) : Work fine (tag move)

1) => 9) : work fine (add items to LT)
2) => 9) : work fine (add items to LT)
6) => 9) : work fine (add items to LT)
7) => 9) : work fine (add items to LT)

1) => 10) : Don't work : expected result: items must be add to list
2) => 10) : Don't work : expected result: items must be add to list
6) => 10) : Don't work : expected result: items must be add to list
7) => 10) : Don't work : expected result: items must be add to list

Unrelevant actions :

3) => 1) : move/copy file operations.
2) => 3) : just impossible to do.
2) => 4) : just impossible to do.
2) => 5) : just impossible to do.

This list can be the content of a new file in svn to exlain D&D operations. It's not complete yet of course. 

What do you think about ?

Gilles Caulier
Comment 4 Marcel Wiesweg 2010-11-16 09:48:56 UTC
- dropping an album (1 or 2) somewhere and expecting a result on all contained items is not expected to work, it's simply not implemented - would need to list all contained items

- 3->6, 3->7, 5->6, 5->7 works fine here on Linux, this is basic functionality. Mac issue?

- dropping to any canvas (4, 11, 12): Yes, not implemented. The canvases dont accept drags.

- dragging from any old-style thumb bar (8, 9, 10, _not_ 5): The solution would be to port to model/view toolbar (as I said above, dragging from 5 works for me) Should be possible without too much work.
Comment 5 caulier.gilles 2010-11-16 09:58:47 UTC
Marcel,

>- dropping an album (1 or 2) somewhere and expecting a result on all contained
>items is not expected to work, it's simply not implemented - would need to list
>all contained items

I remember to have implemented and tested these feature with Qt3/KDE3.

I just compare Qt3 D&D features with Qt4 port (:=)))...

Gilles
Comment 6 caulier.gilles 2010-11-16 10:01:22 UTC
Marcel,

>- 3->6, 3->7, 5->6, 5->7 works fine here on Linux, this is basic functionality.
>Mac issue?

Good question. i will try also under Windows to see...

Gilles Caulier
Comment 7 Andi Clemens 2010-11-16 12:16:56 UTC
(In reply to comment #6)
> Marcel,
> 
> >- 3->6, 3->7, 5->6, 5->7 works fine here on Linux, this is basic functionality.
> >Mac issue?

They don't work for me under Linux! Are you synced with trunk?
Do you work on the GSOC branch (I do not)?

Andi
Comment 8 caulier.gilles 2010-11-16 12:20:14 UTC
Note : for me, i tested with trunk code, not GoSC2010 branch

Gilles Caulier
Comment 9 Andi Clemens 2010-11-16 12:48:48 UTC
If the above mentioned points really work for Marcel, I#ll use git bisect to find out since when it has stopped to work in trunk.
Comment 10 Andi Clemens 2010-11-16 12:52:29 UTC
Ok I just found out that a checkout from March 11, 2010 has 3->6, 3->7, 5->6, 5->7 working.
I'll bisect to find the problem...
Comment 11 Andi Clemens 2010-11-16 14:15:54 UTC
Wow, this doesn't make any sense. My test database works fine, my database with my regular images does not!
I can't figure out why... I even replicated the tag structure from my test db, still it doesn't work.
Weird...
Comment 12 Andi Clemens 2010-11-16 14:18:53 UTC
It even gets weirder:
It doesn't work properly with my test db as well, only the first three albums in the albumfolder view do work, if I select another album, I can not assign tags when dragging images onto the tagfolderview in caption/tags!
Comment 13 Andi Clemens 2010-11-16 14:31:38 UTC
There must be some different problem, it isn't related to D&D I guess.
Every album that I create from now on is NOT able to use D&D as described above, only the old ones.

In the console, I get the following warning:
"Could not find source album of drag"

Have we changed something in the database layout that affects all newly created albums now?
Comment 14 Marcel Wiesweg 2010-11-16 16:00:07 UTC
I'm using the branch, but it worked right now also with trunk for me (dragging an item from icon view to caption/tags tag tree view on a newly created tag)

This is tagdragdrop.cpp, line 124. What is albumID when it fails?
Comment 15 Andi Clemens 2010-11-17 11:35:33 UTC
The albumID is "6" in this case, and it is the right album (according to the database: "/Labs/advancedrename".

I can't see a difference between old and new albums in the database though, this is why I'm so confused right now.
Comment 16 Andi Clemens 2010-11-17 11:39:49 UTC
Marcel, 

am I wrong or is the usage of findTAlbum() in the mentioned line wrong? I drag from a PAlbum, so this method can't work?
Comment 17 Andi Clemens 2010-11-17 11:44:35 UTC
Marcel,

that's definitely the error, because the folder that work have a corresponding tagID that fits, e.g. tagID=2 and albumID=2. albumID=6 does not work, because there is no TAlbum with an ID=6.
Comment 18 Marcel Wiesweg 2010-11-17 12:55:18 UTC
Yes! It seems to be too much copy-and-pasted from the TAlbum variant ;-)
Comment 19 Marcel Wiesweg 2010-11-17 13:01:13 UTC
SVN commit 1198100 by mwiesweg:

Fix PAlbum/TAlbum mismatch.
With tags, we can check if the tag is assigned for the same effect.

CCBUG: 256252

 M  +2 -12     tagdragdrop.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1198100
Comment 20 Andi Clemens 2010-11-17 13:08:34 UTC
Works fine now...
Comment 21 caulier.gilles 2010-11-17 13:12:19 UTC
Andi,

Can you create a copy of my list from #3 to a new working file in project subfolder, and update data accordingly ?

Thanks in advance

Gilles
Comment 22 Andi Clemens 2010-11-17 13:20:07 UTC
Yes, I can do this... it will take a while before I commit it though, since I'll be offline the next few hours.

Andi
Comment 23 Andi Clemens 2010-11-17 15:42:23 UTC
SVN commit 1198126 by aclemens:

D&D behavior for Tags, taken and updated from the following bugreport:
https://bugs.kde.org/show_bug.cgi?id=256252

CCBUG:256252

 A             D&D-Behavior-For-Tags.txt  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1198126
Comment 24 caulier.gilles 2011-12-16 12:37:32 UTC
Martin,

There are few work on this file. It still valid using digiKam 2.x serie ?

Gilles Caulier
Comment 25 Veaceslav Munteanu 2013-11-06 19:22:12 UTC
Assign tags works with one or even multiple selected tags, after implementing Tags Manager.