Bug 152948 - Confirmation dialog is not needed if Captions/Tags take focus and no changes is performed
Summary: Confirmation dialog is not needed if Captions/Tags take focus and no changes ...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Captions (show other bugs)
Version: 3.4.0
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-26 20:01 UTC by Alex Ruddick
Modified: 2017-08-12 11:59 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.4.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Ruddick 2007-11-26 20:01:35 UTC
Version:            (using KDE KDE 3.5.8)
Installed from:    Ubuntu Packages

If you edit a comment but then undo the changes, digiKam still brings up a dialog box asking you if you want to apply your changes.  It could be smarter and check to see if there are any changes.  If the "edited" comment is the same as it was before, don't bother with the dialog box.  The same thing could be done with tags.  Very trivial change, but would save some time.
Reproduction:
(1)Select a picture and focus on the comment field.
(2)Type a character and then backspace.
(3)Select a different picture.

OR

(1)Select a picture and check a tag in the Comment/Tag pane.
(2)Uncheck the same tag.
(3)Select a different picture.
Comment 1 caulier.gilles 2008-12-06 09:23:12 UTC
Andi, Marcel, 

I think this file is solved now. I cannot reproduce it. Right ?

Gilles Caulier
Comment 2 Andi Clemens 2008-12-06 12:31:51 UTC
No, I can confirm this for 0.9.5 and 0.10

Andi
Comment 3 Andi Clemens 2008-12-06 12:32:50 UTC
When you assign a tag for example and remove it again, the confirm dialog still appears.

Andi
Comment 4 Johannes Wienke 2009-10-22 12:11:20 UTC
I just took a look at this code. Wouldn't it be better to let MetadataHub implement a a global "hasChanged" method instead of using the modified flag, that always has to be managed additionally to what MetadataHub already does? But I don't understand all the details of what's going on there...
Comment 5 Marcel Wiesweg 2009-10-22 17:57:32 UTC
Yes it's a bit complex and yes you are probably right but it's not very easy to implement as you suggest (need to keep a copy of initial state)
Comment 6 caulier.gilles 2011-12-14 10:27:44 UTC
Alex,

it still valid using digiKam 2.x serie ?

Gilles Caulier
Comment 7 julien.t43+kde 2012-04-02 08:48:17 UTC
yes still valid (last seen in 2.5.0)
Comment 8 julien.t43+kde 2012-07-07 00:46:41 UTC
still valid for 2.6.0 (ppa)
Comment 9 julien.t43+kde 2012-12-17 21:36:50 UTC
still valid for 2.8.0 (ppa). 

A few side not:
- can also apply to rating or any other non-free text field
- normaly the initial state is either in the database, either file or both depending on user settings (which could change in time ...)
- if there is no visual evidence of the state (full screen mode, side-panel visible, ... - could change with Bug 221142 - Show as overlay some editable exif information on the images with preview canvas), there should be a message (by progress manager ?) to say: "not modified, field 'xxx' unchanged"
Comment 10 caulier.gilles 2013-11-26 17:58:40 UTC
This file still valid using digiKam 3.5.0 ?

Gilles Caulier
Comment 11 Alex Ruddick 2013-11-28 04:57:26 UTC
Presumably.  It's still there on 3.4.0, which is the latest I have installed.
Comment 12 caulier.gilles 2014-09-13 06:32:54 UTC
Git commit d90dcdf2b3cff736176c723246a3522d1e2b1613 by Gilles Caulier.
Committed on 13/09/2014 at 06:32.
Pushed by cgilles into branch 'master'.

If edited and previous strings are empty, do nothing.
FIXED-IN: 4.4.0

M  +7    -0    libkexiv2/altlangstredit.cpp

http://commits.kde.org/libkexiv2/d90dcdf2b3cff736176c723246a3522d1e2b1613
Comment 13 Pino Toscano 2014-10-07 06:08:16 UTC
Git commit 1af638424c3bc55e5ceac5f4ac6f48ee47f407a7 by Pino Toscano, on behalf of Gilles Caulier.
Committed on 13/09/2014 at 06:32.
Pushed by pino into branch 'KDE/4.14'.

If edited and previous strings are empty, do nothing.
FIXED-IN: 4.12.2

(cherry picked from commit d90dcdf2b3cff736176c723246a3522d1e2b1613)

M  +7    -0    libkexiv2/altlangstredit.cpp

http://commits.kde.org/libkexiv2/1af638424c3bc55e5ceac5f4ac6f48ee47f407a7
Comment 14 caulier.gilles 2014-10-07 08:15:47 UTC
With commit form comment #13, patch is backported to KDE 4.12.2
Gilles Caulier