Skip to content

Conversation

TurboGraphxBeige
Copy link
Contributor

Description

Added a new "Field Calculator" menu item in the popup appearing when right clicking in the header of a column in a vector layer's attribute table. The Field Calculator window opens having the "Update existing field" checkbox checked and the corresponding field already selected in the combo box.

The action is enabled or disabled according to the field's possibility to be edited.

This is done by passing an optional field index parameter to QgsFieldCalculator::QgsFieldCalculator constructor (defaults to -1 if null). That makes it like a nice shortcut instead of clicking to open the Field Calculator, then checking "Update existing field" then selected the appropriate field name.

Fixes #55266. Reviving old PR #55293

282995190-6fc02c61-8201-446b-a0a0-4b7536f160e6.mp4

TurboGraphxBeige and others added 30 commits November 14, 2023 22:44
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
@github-actions github-actions bot added this to the 4.0.0 milestone Sep 22, 2025
Copy link
Contributor

github-actions bot commented Sep 22, 2025

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit bebeb1e)

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This installer is not signed, control+click > open the app to avoid the warning
(Built from commit bebeb1e)

@TurboGraphxBeige
Copy link
Contributor Author

TurboGraphxBeige commented Sep 22, 2025

Well, I don't know how to resolve the 2 failing tests.

@agiudiceandrea
Copy link
Member

agiudiceandrea commented Sep 22, 2025

AFAIK the failing PyQgsServerApi test is not related with this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a menu item to open the Field Calculator when right clicking on a column header in the attribute table
2 participants