Summary: | info in Properties panel not updated after moving to other image | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Mikolaj Machowski <mikmach> |
Component: | ImageEditor-Workflow | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | caulier.gilles, marcel.wiesweg, mikmach |
Priority: | NOR | ||
Version: | 0.10.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.5.0 | |
Sentry Crash Report: | |||
Attachments: | fix |
Description
Mikolaj Machowski
2008-08-05 23:43:31 UTC
Created attachment 26867 [details]
fix
This should fix the issue
Thanks, your patch fixes this bug. I'll commit the patch as soon as another developer has taken a look at it, because I'm not quite sure what the old code was meant to do, not that it breaks another function or so. Andi Andi, Patch sound fine for me... but i remember than Marcel has profiled image properties updating here in the pass to speed-up digiKam. Marcel, i'm right ? Mik, this problem is reproductible in KDE3 version ? Gilles Gilles, it is not reproducible in KDE3 and even not in showFoto (KDE4). So I guess there just went something wrong? It is also not reproducible in the album icon view, only in the image editor. Andi Andi, Thanks for the details. I waiting Marcel comments. Gilles The code part touched by Andi's proposed patch has a purpose: If IE is running with database information, i.e. it has ImageInfo objects, then these objects (which provide more than just a URL) shall be passed to the sidebar. There must be something wrong with the sidebar updating code that affects only one panel and only when used from IE - I need to take a look at that. @#4 IE thumbbar exists only in KDE4, isn't it? Mik, image properties is not thumbbar. and yes thumbbar is only avaialble in editor with KDE4 Gilles 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(); } |