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 318182 - Undo does not restore size of automatically resized shapes
Undo does not restore size of automatically resized shapes
Status: RESOLVED FIXED
Product: dia
Classification: Other
Component: objects
0.94
Other All
: Normal normal
: 0.98
Assigned To: Dia maintainers
Dia maintainers
Depends on:
Blocks:
 
 
Reported: 2005-10-07 10:23 UTC by Gilles Rayrat
Modified: 2011-06-13 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Gilles Rayrat 2005-10-07 10:23:29 UTC
Undo should restore the shape's original size

Other information:
To reproduce:
- take a flowchart-square (first shape in folder)
- type text like "123456789" (the shape enlarges itself to follow text length)
- press Ctrl-Z (undo) several times
=>the shape stays as large as for previous text
Comment 1 Leon Stringer 2005-12-15 21:03:01 UTC
Actually this isn't a problem with undo. If you delete the text with backspace
the shape doesn't resize either.
Comment 2 Hans Breuer 2006-02-04 14:44:39 UTC
IMO this *is* a problem with undo. While typing (backspacing) 
magically snapping back to some previous size would be 
encountered as bug by me.

For undo OTOH the 'contract is that everything - including the 
size - should be undone, i.e. restored to state before the 
action being undone. Though looking at the current code I'm 
not sure how to best achieve this.
Comment 3 Sameer D. Sahasrabuddhe 2007-10-11 16:17:01 UTC
I think the problem is in the function handle_key_event() in the file app/disp_callbacks.c, where obj->ops->move has a side effect of updating the object. These side effects should get recorded as Change objects.
Comment 4 ps 2009-05-23 21:39:59 UTC
this is very annoying bug. text editation of objects is undoable only by closing/reopening file.
Comment 5 Hans Breuer 2011-06-13 20:09:04 UTC
Finally I've had an idea how to fix this:
http://git.gnome.org/browse/dia/commit/?id=02f2ae578cdc56d359710000370b034f2e9db162

Also the the obj->ops->move() hack could probably be removed, but that'll be a different commit.