After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 488269 - properties dialog creates empty undo actions when no properties are changed
properties dialog creates empty undo actions when no properties are changed
Status: RESOLVED OBSOLETE
Product: dia
Classification: Other
Component: general
CVS head
Other All
: Normal enhancement
: ---
Assigned To: Sameer D. Sahasrabuddhe
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2007-10-19 14:06 UTC by Sameer D. Sahasrabuddhe
Modified: 2019-03-20 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
introduced a boolean that remembers when changes have been applied (3.00 KB, patch)
2008-11-21 08:55 UTC, Sameer D. Sahasrabuddhe
needs-work Details | Review

Description Sameer D. Sahasrabuddhe 2007-10-19 14:06:05 UTC
Please describe the problem:
The properties dialog has three buttons: Close, Apply and OK. Their behaviour can cause empty Change objects in the Undo stack, when no properties are changed between subsequent button-presses. This is because the function that handles the response to this dialog does not check whether any properties have actually been changed.

1) If you don't change any property and press "Apply" or "OK", the dialog still creates an empty action on the undo stack.
2) If you change some properties and press "Apply" followed by "OK", the undo stack is updated twice, where the effect of the "OK" button-press is empty.
3) If you press "Apply" multiple times, it updates the undo stack every time, although only the first attempt is the only one that could have caused any change in properties.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Sameer D. Sahasrabuddhe 2008-11-21 08:55:34 UTC
Created attachment 123155 [details] [review]
introduced a boolean that remembers when changes have been applied
Comment 2 Hans Breuer 2009-01-31 20:29:40 UTC
patch does not apply cleanly (it predates the flerenaming to app/properties-dialog.c and even the multiple selected objects handling). Also I don't like to mess with propinternals.h here.
Finally I'm assuming it crashes when given e.g. the UML Dialog, or wouldn't that happen?
Comment 3 Hans Breuer 2011-06-12 13:43:34 UTC
I've experimented a bit with this (and even fixed a related bug). See:
http://git.gnome.org/browse/dia/commit/?id=081fa89e1aa7080ffbe11ba000a83bdf1a6aa452

But came to the conclusion that optimizing away the change is not the right thing. IMO a better way to reflect "no change" would be to disable Apply/Ok for the case of no effective change. That would need some restructuring with the signal handling of properties and probably an own implementation of the peroperty dialog. At least I could not find a way to get on the buttons of a GtkDialog.

Anyway the current behaviour looks conssitent: the user does something and that has an effect. Enahncement as outlined above accepted.
Comment 4 GNOME Infrastructure Team 2019-03-20 11:35:44 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/dia/issues/220.