Feature request #10727
field calculator bar should consider selection and react on return
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||19113|
So I have a 34 polygons. I select 24 of them and need to calculate a field. If I use the new field calculator (bar at the top of the attribute table) and set the value to 2 and hit return nothing happens. The field isn't calculated. If I click update all - all rows (regardless of selection) are calculated to 2. It would seem that in the case of several rows being selected - only those would be calculated. If I open the field calculator everything works as expected.
#1 Updated by Nathan Woodrow almost 6 years ago
Hitting Return doesn't work as there is a bug that I couldn't work out before the release, I will fix it after release.
the update button affects what is shown in the table, if you want to update only the selection you need to set the filter Show Selected and then press Update Filtered.
I will consider bringing a Update Selection button in 2.6 but I prefer the Filter -> Update method because you get what you see.
If you need to updates on in batch just leave the filter to Show Selected and it will update as the selection does.
#4 Updated by Nathan Woodrow almost 6 years ago
- Operating System deleted (
- Tag set to ui
- OS version deleted (
- Assignee set to Nathan Woodrow
I'm not sure about that. I don't like the idea of changing the filter on the user, they may have it set the way they like it.
I will consider adding a Update Selected button.
#5 Updated by Matthias Kuhn almost 6 years ago
That was neither supposed to propose to change the filter on the user nor not to introduce the "Update Selected" button.
The proposal was just to change the filter mode "Selection" to "Selection (if present)" and to use this as default when opening the attribute table. So it is only marginally related to this issue.
#6 Updated by Andrew Mitchell over 5 years ago
Having to hide the non-selected records before running an update to change the selected records is a lot more work, particularly when working with large tables that need small groups of records updated each time. I would also prefer to be able to see both the selected and non-selected records when updating selected records as this provides me with feedback that the update operation has honored the intended scope.
Another potential issue relating to long tables is the sort order of the table changing after an update operation. This is very unhelpful when manually processing tables starting at the top and moving progressively toward the bottom. I am not suggesting QGIS has this issue, I have not looked but another system I use does this. In short, I prefer to be able to edit small selections without having to requery the table or perform any other operation that could effect row order.