#2542 closed enhancement (fixed)
field calculator default behaviour
Reported by: | best | Owned by: | mhugent |
---|---|---|---|
Priority: | minor: annoyance | Milestone: | Version 1.5.0 |
Component: | Vectors | Version: | 1.4.0 |
Keywords: | field calculator | Cc: | |
Must Fix for Release: | No | Platform: | All |
Platform Version: | Awaiting user input: | no |
Description
Thank you for the field calculator it is a very welcome feature!
However its default behaviour (checkbox settings) is to update all records in the first existing field. This applies to QGIS 1.4.0-2.8 (OpenSuse).
To prevent users from corrupting their data I would expect it the other way round: update only selected records and ask for a new field.
Explanation
- Most of the time I am using the field calculator, I want to update only selected records (graphical or logical selection). So I have to take extra care to check only update selected features. When I forget to do so, my data already being in the target field are gone. On the other hand if I want to update all records and the default would be only update selected features all I have to do is redoing the calculation after unchecking only update selected features.
- The first existing field normally is an ID field. You do not want to update this field! But if you do not take extra care you do so. If update existing field would be unchecked the user has to do something in order to execute the calcualtion: either check update existing field and choose the field or enter a new field. Thus the risk of data corruption by accident is minimized.
I am totally aware that discarding the changes keeps the data as they are. But it is annoying to stop the edit mode, discard all(!) changes and redo all I did when I realize I made a mistake (if I realize!).
Proposal
- If a selection exists on the table check only update selected features by default.
- Uncheck update exisiting field by default.
Change History (5)
follow-up: 2 comment:1 by , 14 years ago
follow-up: 5 comment:2 by , 14 years ago
Replying to jef:
You can also undo (and redo) field calculator changes - without leaving editing mode.
Didn't know that, although I was looking for it (only in the table window, though :) I still think the current default settings are more error-prone than my proposal.
comment:3 by , 14 years ago
Owner: | changed from | to
---|
The proposed changes sound good to me. I'm going to look at it.
comment:5 by , 14 years ago
Replying to best:
Replying to jef:
You can also undo (and redo) field calculator changes - without leaving editing mode.
Didn't know that, although I was looking for it (only in the table window, though :) I still think the current default settings are more error-prone than my proposal.
Sure. I wasn't implying that your proposal was bad. I just thought you should know about another "very welcome feature". ;)
Replying to best:
You can also undo (and redo) field calculator changes - without leaving editing mode.