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 697927 - Validation breaks undo
Validation breaks undo
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other All
: Normal major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-04-13 01:07 UTC by Morten Welinder
Modified: 2013-04-14 16:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2013-04-13 01:07:40 UTC
1. New Gnumeric
2. Enter "xyz" in A1.
3. Undo

--> Sheet is still marked dirty with a "*" in the title.

The problem is that wbcg_edit_finish on line 391 calls go_undo_undo
to undo the temporary change made for purposes of validation, probably
on line 372.  During that undo, we end up re-spanning:

  • #0 sheet_mark_dirty
    at sheet.c line 4683
  • #1 sheet_range_calc_spans
    at sheet.c line 1452
  • #2 clipboard_paste_region
    at clipboard.c line 629
  • #3 cb_clipboard_copy_range_undo
    at clipboard.c line 730
  • #4 wbcg_edit_finish
    at wbc-gtk-edit.c line 391

Comment 1 Morten Welinder 2013-04-13 01:10:00 UTC
I think we're making a mistake by using the undo operators
system for this.  We don't want re-spanning for the temporary change
here: not for the initial change and not for the undo.  We want
to sneakily poke the would-be value in there, do our test, and get
out of there.
Comment 2 Morten Welinder 2013-04-13 15:31:05 UTC
Fix in hand.  (No commit access here.)
Comment 3 Morten Welinder 2013-04-14 16:18:28 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.