[Digikam-devel] [Bug 140227] remove or modify D&D tags menu from icon view area

Marcel Wiesweg marcel.wiesweg at gmx.de
Wed Feb 28 15:53:43 GMT 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=140227         




------- Additional Comments From marcel.wiesweg gmx de  2007-02-28 16:53 -------
SVN commit 638027 by mwiesweg:

Do not include the "dropped-on" item in the list when "Selected items"
is chosen and the dropped item is not selected

CCBUG:140227


 M  +5 -16     albumiconview.cpp  


--- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #638026:638027
 @ -1212,18 +1212,13  @
             int id = popMenu.exec(QCursor::pos());
             switch(id) 
             {
-                case 10:    // Selected and Dropped Items
+                case 10:    // Selected Items
                 {
                     emit signalProgressBarMode(StatusProgressBar::ProgressBarMode, 
                                                i18n("Assign tag to pictures. Please wait..."));
 
-                    // get selected image infos
-                    QPtrList<ImageInfo> infos = selectedImageInfos(true);
-                    // add droppted item
-                    AlbumIconItem *dropItem = findItem(event->pos());
-                    if (dropItem)
-                        infos.append(dropItem->imageInfo());
-                    changeTagOnImageInfos(infos, QValueList<int>() << tagID, true, true);
+                    // always give a copy of the image infos (the "true"). Else there were crashes reported.
+                    changeTagOnImageInfos(selectedImageInfos(true), QValueList<int>() << tagID, true, true);
 
                     emit signalProgressBarMode(StatusProgressBar::TextMode, QString());
                     break;
 @ -1294,18 +1289,12  @
         int id = popMenu.exec(QCursor::pos());
         switch(id) 
         {
-            case 10:    // Selected and Dropped Items
+            case 10:    // Selected Items
             {
                 emit signalProgressBarMode(StatusProgressBar::ProgressBarMode, 
                                             i18n("Assign tags to pictures. Please wait..."));
 
-                // get selected image infos
-                QPtrList<ImageInfo> infos = selectedImageInfos(true);
-                // add droppted item
-                AlbumIconItem *dropItem = findItem(event->pos());
-                if (dropItem)
-                    infos.append(dropItem->imageInfo());
-                changeTagOnImageInfos(infos, tagIDs, true, true);
+                changeTagOnImageInfos(selectedImageInfos(true), tagIDs, true, true);
 
                 emit signalProgressBarMode(StatusProgressBar::TextMode, QString());
                 break;



More information about the Digikam-devel mailing list