[Digikam-devel] [Bug 143934] Cannot download all photos from camera

Gilles Caulier caulier.gilles at gmail.com
Thu Aug 30 17:16:51 BST 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=143934         




------- Additional Comments From caulier.gilles gmail com  2007-08-30 18:16 -------
SVN commit 706515 by cgilles:

digiKam from KDE3 branch : missing to force to selectAll item is DownloadAll or DownloadAndDeleteAll is used
CCBUGS: 143934


 M  +6 -11     cameraui.cpp  


--- branches/extragear/kde3/graphics/digikam/utilities/cameragui/cameraui.cpp #706514:706515
 @ -1080,6 +1080,12  @
 
 void CameraUI::slotDownload(bool onlySelected, bool deleteAfter, Album *album)
 {
+    // See B.K.O #143934: force to select all items to prevent problem 
+    // when !renameCustomizer->useDefault() ==> iconItem->getDownloadName()
+    // can return an empty string in this case because it depends on selection.
+    if (!onlySelected)
+        d->view->slotSelectAll();
+
     QString   newDirName;
     IconItem* firstItem = d->view->firstItem();
     if (firstItem)
 @ -1169,12 +1175,6  @
         downloadName                 = iconItem->getDownloadName();
         mtime                        = iconItem->itemInfo()->mtime;
 
-        // occurs if renameCustomizer->useDefault() and Download All is used.
-        // If !useDefault, downloadName depends on selection,
-        // so Download All is disabled! (see slotNewSelection)
-        if (downloadName.isEmpty())
-            downloadName = d->view->defaultDownloadName(iconItem);
-        
         KURL u(url);
         QString errMsg;
         QDateTime dateTime;
 @ -1544,16 +1544,11  @
 {
     if (!d->renameCustomizer->useDefault())
     {
-        // for customized names, the downloadNames depend on the selection.
-        // So do not allow Download All if there is a selection!
         d->downloadMenu->setItemEnabled(0, hasSelection);
         d->downloadMenu->setItemEnabled(2, hasSelection);
     }
     else
     {
-        // if useDefault, the name can easily be computed without selection context,
-        // so we can allow Download All.
-        // This is the easiest default for new users
         d->downloadMenu->setItemEnabled(0, hasSelection);
         d->downloadMenu->setItemEnabled(2, hasSelection);
     }



More information about the Digikam-devel mailing list