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 161890 - undo doesn't restore formula correctly
undo doesn't restore formula correctly
Status: VERIFIED FIXED
Product: Gnumeric
Classification: Applications
Component: Main System
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-12-21 14:23 UTC by Markus Bertheau
Modified: 2008-01-09 14:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
spreadsheet used to expose the bug (1.63 KB, application/x-gnumeric)
2004-12-21 14:24 UTC, Markus Bertheau
Details

Description Markus Bertheau 2004-12-21 14:23:46 UTC
1. Open the attached spread sheet
2. Select everything by clicking in the upper left corner
3. Data -> Sort; click "Sort range has a header"; OK
4. Undo

result: formula in C4 is sum(#REF!)
expected result: the formula in C4 is the same as before

This is with version 1.2.13
Comment 1 Markus Bertheau 2004-12-21 14:24:39 UTC
Created attachment 35083 [details]
spreadsheet used to expose the bug
Comment 2 Morten Welinder 2004-12-21 14:38:37 UTC
Confirmed.
Comment 3 Jody Goldberg 2005-07-12 19:25:16 UTC
I see the problem in cvs-2005-jul-11
We are assuming that the relocations in a sort operation are non-destructive.
You've just found a case where they are descructive.
Comment 4 Morten Welinder 2006-04-13 21:06:48 UTC
Specifically the problem is that the formula in C4 [=sum(B2:B4)] is moved
to C2 where it no longer makes sense.

That's a pretty nasty formula to sort, but obviously undo should still work.
We should probably simply copy the source area.
Comment 5 Morten Welinder 2006-04-14 01:17:21 UTC
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.
Comment 6 Markus Bertheau 2008-01-09 08:21:02 UTC
Bug still exists in 1.7.11 on Ubuntu 7.10.
Comment 7 Morten Welinder 2008-01-09 14:14:01 UTC
> Bug still exists in 1.7.11 on Ubuntu 7.10.

What, specifically, do you mean by that?

As far as I can tell, the initial sorting result -- which produces #REF! --
is the right thing to do.  Undo works for me.
Comment 8 Markus Bertheau 2008-01-09 14:17:46 UTC
Oh, yes, of course. I mistook #REF for the bug. My fault - sorry. Verified fixed :)