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 622509 - validation circumvention
validation circumvention
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Main System
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-06-23 17:00 UTC by Andreas J. Guelzow
Modified: 2010-06-24 01:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2010-06-23 17:00:18 UTC
new gnumeric
set up validation for A1 to only allow whole numbers between 0 and 9 with the action to never allow invalid input
attempt to enter 2.5
validation intercedes and correctly prohibits entering of that number. Discard.
Note that entering '2.5" is not on the redo menu.
selecting that item from the redo menu enters 2.5 in the cell without validation.

This item should never appear on the redo menu! It is not properly an undone action.

The cause for this is that wbcg_edit_finish calls command-undo if validation fails since it already committed the changes using cmd_set_text or cmd_set_array_text. I think this should really be done by setting up the correct GOUndos and only invoking the cmd_... (probably cmd_generic) when the action has been validated!

In fact I think that wbcg_edit_finish should be devided into a wbcg_edit_finish_construct that creates an undo and a redo GOUndo and a wrapper that commits those undos.

Since validation could depend on external data one could make a case that validation should also happen on 'redo' but that is arguable.
Comment 1 Andreas J. Guelzow 2010-06-24 01:54:01 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.