Bug 211535 - Revert and undo in image editor does not work
Summary: Revert and undo in image editor does not work
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: ImageEditor-Undo (show other bugs)
Version: 1.0.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-23 13:48 UTC by Guenther M. Erhard
Modified: 2017-08-08 08:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guenther M. Erhard 2009-10-23 13:48:25 UTC
Version:           Version 1.0.0-beta6 (rev.: 1038724) (using KDE 4.2.4)
OS:                Linux
Installed from:    SuSE RPMs

Hi,

During editing pictures I discovered following two (probably related) problems:

1) Revert function
When I want to go back to the beginning of the editing because I'm not satisfied with the result I use the button revert (or use the menu entry). But calling that function shows an odd behaviour. After I selected "discard" in the dialog the image disappears and the editor canvas remains black. I have to load the file again from digikam or with the file-open dialog. In earlier versions the editor loaded the file again by itself and the image appeared in its unmodified state on the canvas. Here is what I got on the console after pressing the discard button:
digikam(5081)/digikam (core) Digikam::DImg::load: ""  : Unknown image format !!!
digikam(5081)/digikam (core) Digikam::DImgInterface::getImg: d->image is NULL
digikam(5081)/digikam (core) Digikam::DImg::load: "/home/ablage/Grafiken/Originale/() E_Barcelona_2006/Originalscans/Bild_M2c_063.tif"  : TIFF file identified

2) Undo function
During editing I want to undo a step (e.g. rotation or curves). In earlier versions I used the function undo to do this. But now pressing the button (or using the menu entry) has effect. The image stays as it is and also on the console there are no messages. It seems like the function behind the toolbar button is commented out.

TIA
Guenther
Comment 1 caulier.gilles 2009-10-23 14:10:43 UTC
Not reproducible here....

Gilles Caulier
Comment 2 Andi Clemens 2009-10-23 14:20:45 UTC
Works fine here, too...
Comment 3 Guenther M. Erhard 2009-10-23 18:09:26 UTC
(In reply to comment #2)
> Works fine here, too...

During my attempts to get assigning color profiles working again I upgraded now kde to 4.3.2 and qt to 4.5.2. On top of that I de-installed everything (hopefully) from svn, checked out and compiled again.

Color profile is working now, but revert and undo still show this odd behaviour. :-(. I've tested it under kde3.5, kde4.3.2 and Gnome2.28: no difference.

Guenther
Comment 4 Andi Clemens 2009-10-24 12:57:52 UTC
I can confirm a dysfunction in UNDO now, and it is very weird.
I just discovered it for the first time, but my issue seems to be different.

I opened a single file (an single image in a folder) and edited it. Then I pressed "undo", and a totally different file from a different folder (which is not loaded into IE at all) is displayed!
I'll do a small video to proof it.
Comment 6 Guenther M. Erhard 2009-10-25 12:07:02 UTC
(In reply to comment #5)
> Here: http://digikam3rdparty.free.fr/misc.tarballs/temp/undo_broken.mov

Very odd. That is different to my bug.
Comment 7 Guenther M. Erhard 2009-10-25 12:10:53 UTC
I have gone now back from kde4.3.2 to kde4.2.4, because the crash at the program exit was distracting. Afterwards I have compiled a new version 1.0.0-beta6 (rev.: 1039950). At least for the moment undo is working now. It seems that it is somehow dependend on kde libraries  and versions.

Revert still does not show the original image after discard.

Guenther
Comment 8 caulier.gilles 2009-10-25 12:59:31 UTC
What's the size of your image.

What do you see on the console when you run digiKam (run kdebugdialog and turn on digikam debug space before)

What the space on you /var. Usually, it's the place where temp files are written by editor (under Mandriva for me)

Gilles Caulier
Comment 9 Andi Clemens 2009-10-26 00:28:10 UTC
According to "git bisect", 
commit #1014134 (http://websvn.kde.org/?revision=1014134&view=revision) 
is responsible for the "revert" issue.
Comment 10 Andi Clemens 2009-10-26 10:54:34 UTC
I guess my weird "undo" issue from the video link above (I can not reproduce it right now) might be introduced by this commit as well, since something about image loading changed?
Comment 11 Marcel Wiesweg 2009-10-26 18:44:30 UTC
SVN commit 1040697 by mwiesweg:

Fix "Revert" button in editor (calling resetValues() will clear the currentDescription)

CCBUG: 211535

 M  +2 -2      dimginterface.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1040697
Comment 12 Marcel Wiesweg 2009-10-26 19:25:11 UTC
The "revert" problem is fixed, but I can't reproduce any undo/redo problem here.
I think these problems are unrelated, because revert() works by full reloading while undo/redo replaces the image data of the current image, not using the loading framework.
Comment 13 Guenther M. Erhard 2009-10-26 19:28:13 UTC
(In reply to comment #8)
> What's the size of your image.
> 
This independent of the size. I have images with a few 100k up to 120MB.

> What do you see on the console when you run digiKam (run kdebugdialog and turn
> on digikam debug space before)
> 
There is no entry of digikam in kdebugdialog. On the console I see only this:
digikam(11315)/digikam (core) Digikam::DImg::load: ""  : Unknown image format !!!
digikam(11315)/digikam (core) Digikam::DImgInterface::getImg: d->image is NULL

> What the space on you /var. Usually, it's the place where temp files are
> written by editor (under Mandriva for me)
> 
18GB left - should be enough.

Guenther
Comment 14 Guenther M. Erhard 2009-10-26 20:58:10 UTC
(In reply to comment #12)
> The "revert" problem is fixed, but I can't reproduce any undo/redo problem
> here.
> I think these problems are unrelated, because revert() works by full reloading
> while undo/redo replaces the image data of the current image, not using the
> loading framework.
>
I can confirm that with version 1.0.0-beta6 (rev.: 1040748) revert as well as undo is now working without problems. Thanks for the quick fix.

Guenther
Comment 15 caulier.gilles 2009-10-26 21:15:13 UTC
So, we can close this file now ?

Gilles Caulier
Comment 16 Guenther M. Erhard 2009-10-26 21:25:56 UTC
(In reply to comment #15)
> So, we can close this file now ?
> 
From my point of view: yes.

Guenther