Bug 145204 - small issues with the light-table
Summary: small issues with the light-table
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: LightTable-Engine (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-08 22:32 UTC by Arnd Baecker
Modified: 2012-09-03 07:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arnd Baecker 2007-05-08 22:32:05 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Debian stable Packages

The new light-table works really great!

There are a couple of small issues:
a) after entering the light-table, drag-and-drop of the very first
   thumb does not work
   (it does work, after selecting the next and then selecting the
    first  again)
b) Associating ratings via CTRL-1, to CTRL-5 does not seem to work.
   (This might one of the most common ways of marking the
   winners/loosers...)
c) When replacing an image (e.g. with "show on right panel")
   the zoom and pan is reset. 
   For easy comparing several similar this should be kept 
   (as long as they have the same size).
d) After removing items from the thumbbar, a re-fresh should be issued
   (currently a gap remains).
   BTW: maybe DEL as short-cut to remove items from the thumbs would
   be nice?
Comment 1 caulier.gilles 2007-05-08 22:37:06 UTC
Arnd,

a) I can reproduce it. I will fix it.

b) not easy to do. we have  image at the same time in LT. On witch image we must apply rating ?

c) Agree. Todo.

d) a refresh where ? in thumbbar or in preview panel ?

Gilles
Comment 2 Arnd Baecker 2007-05-08 23:01:22 UTC
b) Yes, this is a problem. Options would be
   - apply to the image for which the corresponding side-bar is open (or active)
   - if both are open: only apply to the left one?
   - always only apply to the left one ("master image")?
   Hmm, and then there is the presently active image in the thumb-bar, 
   which is not related to either of the shown images.

   Maybe something more visual and less implicit is needed?
   - mark the left and right selected image by some color in the thumbbar
     (so one really knows which are displayed)
   - uses the small space below each thumb to display the 5-stars rating
     (and to modify with the mouse)
d) refresh in the thumbbar 
Comment 3 caulier.gilles 2007-05-08 23:14:14 UTC
SVN commit 662671 by cgilles:

digikam from trunk : BKO #145204 point (a) fixed.
CCBUGS: 145204


 M  +8 -4      thumbbar.cpp  


--- trunk/extragear/graphics/digikam/libs/thumbbar/thumbbar.cpp #662670:662671
@@ -569,9 +569,15 @@
        }
     }
 
-    if (!barItem || barItem == d->currItem)
+    if (!barItem)
         return;
 
+    d->dragging     = true;
+    d->dragStartPos = e->pos();
+
+    if (barItem == d->currItem)
+        return;
+
     if (d->currItem)
     {
         ThumbBarItem* item = d->currItem;
@@ -579,9 +585,7 @@
         item->repaint();
     }
 
-    d->dragging     = true;
-    d->dragStartPos = e->pos();
-    d->currItem     = barItem;
+    d->currItem = barItem;
     barItem->repaint();
 
     emit signalURLSelected(barItem->url());
Comment 4 caulier.gilles 2007-05-09 07:50:48 UTC
>d) After removing items from the thumbbar, a re-fresh should be issued
>   (currently a gap remains).

Not reproductible here. The item is removed and the thumbbar is re-fresh properlly.

Gilles
Comment 5 Arnd Baecker 2007-05-09 08:41:18 UTC
d) yes, I can confirm: it is not reproducible anymore
after an update - looks like this problem is gone (I like those ;-)
Comment 6 Mikolaj Machowski 2007-05-09 08:54:11 UTC
>    - if both are open: only apply to the left one?


Well, for first thing: limitation to two images should be removed.

>    - uses the small space below each thumb to display the 5-stars rating
>      (and to modify with the mouse)


Why only rating? Best feature would be making thumbs in LT copy of those 
in Album view, with tags, comments, etc.

----------------------------------------------------
Ekstraliga 
Comment 7 caulier.gilles 2007-05-09 15:14:36 UTC
SVN commit 662874 by cgilles:

digikam from trunk : BKO #145204 point (c) fixed.
CCBUGS: 145204

 M  +51 -31    lighttableview.cpp  
 M  +6 -1      lighttableview.h  
 M  +2 -0      lighttablewindow.cpp  


--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.cpp #662873:662874
@@ -47,12 +47,16 @@
     LightTableViewPriv()
     {
         syncPreview  = false;
+        leftLoading  = false;
+        rightLoading = false;
         leftPreview  = 0;
         rightPreview = 0;
         grid         = 0;
     }
 
     bool               syncPreview;
+    bool               leftLoading;     // To not sync right panel during left loading.
+    bool               rightLoading;    // To not sync left panel during right loading.
 
     QGridLayout       *grid;
 
@@ -119,16 +123,10 @@
             this, SLOT(slotRightContentsMoved(int, int)));
 
     connect(d->leftPreview, SIGNAL(signalPreviewLoaded(bool)),
-            this, SIGNAL(signalLeftPreviewLoaded(bool)));
+            this, SLOT(slotLeftPreviewLoaded(bool)));
 
     connect(d->rightPreview, SIGNAL(signalPreviewLoaded(bool)),
-            this, SIGNAL(signalRightPreviewLoaded(bool)));
-
-    connect(d->leftPreview, SIGNAL(signalPreviewLoaded(bool)),
-            this, SLOT(slotPreviewLoaded()));
-
-    connect(d->rightPreview, SIGNAL(signalPreviewLoaded(bool)),
-            this, SLOT(slotPreviewLoaded()));
+            this, SLOT(slotRightPreviewLoaded(bool)));
 }
 
 LightTableView::~LightTableView()
@@ -141,26 +139,6 @@
     d->syncPreview = sync;
 }
 
-void LightTableView::setLeftImageInfo(ImageInfo* info)
-{
-    d->leftPreview->setImageInfo(info);    
-}
-
-void LightTableView::setRightImageInfo(ImageInfo* info)
-{
-    d->rightPreview->setImageInfo(info);    
-}
-
-ImageInfo* LightTableView::leftImageInfo() const
-{
-    return d->leftPreview->getImageInfo();
-}
-
-ImageInfo* LightTableView::rightImageInfo() const
-{
-    return d->rightPreview->getImageInfo();
-}
-
 void LightTableView::slotDecreaseZoom()
 {
     if (!d->syncPreview) return;
@@ -289,7 +267,7 @@
 
 void LightTableView::slotLeftContentsMoved(int x, int y)
 {
-    if (d->syncPreview)
+    if (d->syncPreview && !d->leftLoading)
     {
         d->rightPreview->blockSignals(true);
         setRightZoomFactor(d->leftPreview->zoomFactor());
@@ -301,7 +279,7 @@
 
 void LightTableView::slotRightContentsMoved(int x, int y)
 {
-    if (d->syncPreview)
+    if (d->syncPreview && !d->rightLoading)
     {
         d->leftPreview->blockSignals(true);
         setLeftZoomFactor(d->rightPreview->zoomFactor());
@@ -311,8 +289,50 @@
     }
 }
 
-void LightTableView::slotPreviewLoaded()
+ImageInfo* LightTableView::leftImageInfo() const
 {
+    return d->leftPreview->getImageInfo();
+}
+
+ImageInfo* LightTableView::rightImageInfo() const
+{
+    return d->rightPreview->getImageInfo();
+}
+
+void LightTableView::setLeftImageInfo(ImageInfo* info)
+{
+    d->leftLoading = true;
+    d->leftPreview->setImageInfo(info);    
+}
+
+void LightTableView::setRightImageInfo(ImageInfo* info)
+{
+    d->rightLoading = true;
+    d->rightPreview->setImageInfo(info);    
+}
+
+void LightTableView::slotLeftPreviewLoaded(bool success)
+{
+    emit signalLeftPreviewLoaded(success);
+
+    checkForSyncPreview();
+    d->leftLoading = false;
+    slotRightContentsMoved(d->rightPreview->contentsX(), 
+                           d->rightPreview->contentsY());
+}
+
+void LightTableView::slotRightPreviewLoaded(bool success)
+{
+    emit signalRightPreviewLoaded(success);
+
+    checkForSyncPreview();
+    d->rightLoading = false;
+    slotLeftContentsMoved(d->leftPreview->contentsX(), 
+                          d->leftPreview->contentsY());
+}
+
+void LightTableView::checkForSyncPreview()
+{
     if (d->leftPreview->getImageInfo() && d->rightPreview->getImageInfo() &&
         d->leftPreview->getImageSize() == d->rightPreview->getImageSize())
     {
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.h #662873:662874
@@ -110,10 +110,15 @@
 
     void slotLeftContentsMoved(int, int);
     void slotRightContentsMoved(int, int);
-    void slotPreviewLoaded();
+    void slotLeftPreviewLoaded(bool);
+    void slotRightPreviewLoaded(bool);
 
 private :
 
+    void checkForSyncPreview();
+
+private :
+
     LightTableViewPriv* d;    
 };
 
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.cpp #662873:662874
@@ -474,7 +474,9 @@
         {
             LightTableBarItem *item = new LightTableBarItem(d->barView, *it);
             if (*it == imageInfoCurrent)
+            {
                 d->barView->setSelected(item);
+            }
         }
     }   
 
Comment 8 caulier.gilles 2007-05-09 15:17:54 UTC
Arnd,

Point a), c), and d) are done. I will close this file.

For the point b), i have no idea how to fix it imediatly. I need more time and more feedback from users, especially when 0.9.2-beta2 will be released.

To be clear, i recommend you to post a new file in B.K.O especially for this point.

Thanks in advance

Gilles
Comment 9 Julien Narboux 2007-05-09 15:34:44 UTC
About point b), I think the best way is to have a notion of "active picture". All the changes are applied to the current active picture (number of stars, tags...).

In iphoto the lighttable is presented like this :
- This is not a separate window.
- When in full screen mode, a list of thumbnails is displayed on the top of the screen.
- When several thumbnails are selected using shift-click then the lighttable mode is activated. The lighttable is splitted according to the number of pictures to be compared. One on these pictures is "selected". When browsing the pictures (either by cliking on thumnails or by pressing left right keys), only the selected picture is changed. This allows to compare a set of given pictures with the other pictures.


Best wishes,

Julien
Comment 10 caulier.gilles 2007-05-09 15:49:18 UTC
Julien,

Report your comment #9 in B.K.O #145227. This file is now closed. Thanks in advance

Gilles
Comment 11 Arnd Baecker 2007-05-09 18:25:14 UTC
The problem with d) is back again, and seems reproducible (for me).
Should I re-open this bug because of this?
Comment 12 Arnd Baecker 2007-05-13 19:32:58 UTC
Problem d) seems to be resolved - tried in various way to reproduce, 
without success, i.e. all is fine. Thanks!