[Digikam-devel] [Bug 147854] Put images into an emptied light-table

Gilles Caulier caulier.gilles at gmail.com
Fri Sep 7 11:37:04 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=147854         




------- Additional Comments From caulier.gilles gmail com  2007-09-07 12:37 -------
SVN commit 709362 by cgilles:

backport commits #709349 from KDE3 branch 
CCBUGS: 147854


 M  +14 -5     lighttablewindow.cpp  
 M  +1 -1      lighttablewindow.h  


--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.cpp #709361:709362
 @ -500,7 +500,9  @
 // Deal with items dropped onto the thumbbar (e.g. from the Album view)
 void LightTableWindow::slotThumbbarDroppedItems(const ImageInfoList& list)
 {
-    loadImageInfos(list, ImageInfo());
+    // Setting the third parameter of loadImageInfos to true
+    // means that the images are added to the presently available images.
+    loadImageInfos(list, ImageInfo(), true);
     if (list.count()>1)
         setLeftRightItems(list);
 }
 @ -513,8 +515,14  @
 //     c) albumiconview.cpp: AlbumIconView::insertToLightTable
 //          calls ltview->loadImageInfos(list, current);
 // - via drag&drop, i.e. calls issued by the ...Dropped... routines
-void LightTableWindow::loadImageInfos(const ImageInfoList &list, const ImageInfo &givenImageInfoCurrent)
+void LightTableWindow::loadImageInfos(const ImageInfoList &list, 
+                                      const ImageInfo &givenImageInfoCurrent,
+                                      bool addTo)
 {
+    // Clear all items before adding new images to the light table.
+    if (!addTo)
+        slotClearItemsList();
+
     ImageInfoList l = list;
     ImageInfo imageInfoCurrent = givenImageInfoCurrent;
 
 @ -522,7 +530,6  @
         imageInfoCurrent = l.first();
 
     AlbumSettings *settings = AlbumSettings::instance();
-
     if (!settings) return;
 
     QString imagefilter = settings->getImageFileFilter().toLower() +
 @ -734,7 +741,8  @
 void LightTableWindow::slotLeftDroppedItems(const ImageInfoList& list)
 {
     ImageInfo info = list.first();
-    loadImageInfos(list, info);
+    // add the image to the existing images
+    loadImageInfos(list, info, true);
 
     // We will check if first item from list is already stored in thumbbar
     // Note that the thumbbar stores all ImageInfo reference 
 @ -758,7 +766,8  @
 void LightTableWindow::slotRightDroppedItems(const ImageInfoList& list)
 {
     ImageInfo info = list.first();
-    loadImageInfos(list, info);
+    // add the image to the existing images
+    loadImageInfos(list, info, true);
     if (list.count()>1)
         setLeftRightItems(list);
 
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.h #709361:709362
 @ -57,7 +57,7  @
     static LightTableWindow *lightTableWindow();
     static bool              lightTableWindowCreated();
 
-    void loadImageInfos(const ImageInfoList &list, const ImageInfo &imageInfoCurrent);
+    void loadImageInfos(const ImageInfoList &list, const ImageInfo &imageInfoCurrent, bool addTo);
     void setLeftRightItems(const ImageInfoList &list);
 
 signals:



More information about the Digikam-devel mailing list