[Digikam-devel] [Bug 168461] info in Properties panel not updated after moving to other image

Gilles Caulier caulier.gilles at gmail.com
Sun Aug 24 08:27:43 BST 2008


http://bugs.kde.org/show_bug.cgi?id=168461


Gilles Caulier caulier gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #10 from Gilles Caulier <caulier gilles gmail com>  2008-08-24 09:27:41 ---
SVN commit 851606 by mwiesweg:

Properly update the current ImageInfo as well as the current url in
slotThumbBarItemSelected.

Add some more emptiness checks which seem necessary to me.

BUG: 168461


 M  +14 -5     imagewindow.cpp


---
trunk/extragear/graphics/digikam/utilities/imageeditor/editor/imagewindow.cpp
#851605:851606
@@ -455,7 +455,13 @@
    if (!promptUserSave(d->urlCurrent))
        return;

+    int index = d->urlList.indexOf(url);
+    if (index == -1)
+        return;
+
    d->urlCurrent = url;
+    if (!d->imageInfoList.isEmpty())
+        d->imageInfoCurrent = d->imageInfoList[index];

    m_saveAction->setEnabled(false);
    m_revertAction->setEnabled(false);
@@ -482,7 +488,6 @@
 void ImageWindow::loadImageInfos(const ImageInfoList &imageInfoList, const
ImageInfo &imageInfoCurrent,
                                 const QString& caption, bool allowSaving)
 {
-    // The ownership of objects of imageInfoList is passed to us.
    // imageInfoCurrent is contained in imageInfoList.

    // Very first thing is to check for changes, user may choose to cancel
operation
@@ -574,7 +579,8 @@
        ++index;
        if (index != d->urlList.size())
        {
-           d->imageInfoCurrent = d->imageInfoList[index];
+           if (!d->imageInfoList.isEmpty())
+               d->imageInfoCurrent = d->imageInfoList[index];
           d->urlCurrent = d->urlList[index];
           slotLoadCurrent();
        }
@@ -594,7 +600,8 @@

        if (index != d->urlList.size())
        {
-           d->imageInfoCurrent = d->imageInfoList[index];
+           if (!d->imageInfoList.isEmpty())
+               d->imageInfoCurrent = d->imageInfoList[index];
           d->urlCurrent = d->urlList[index];
           slotLoadCurrent();
        }
@@ -607,7 +614,8 @@
        return;

    d->urlCurrent = d->urlList.first();
-    d->imageInfoCurrent = d->imageInfoList.first();
+    if (!d->imageInfoList.isEmpty())
+        d->imageInfoCurrent = d->imageInfoList.first();
    slotLoadCurrent();
 }

@@ -617,7 +625,8 @@
        return;

    d->urlCurrent = d->urlList.last();
-    d->imageInfoCurrent = d->imageInfoList.last();
+    if (!d->imageInfoList.isEmpty())
+        d->imageInfoCurrent = d->imageInfoList.last();
    slotLoadCurrent();
 }


-- 
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list