Skip to content

Adding "Field Calculator" menu item to the attribute table header (Request in QGIS) #10861

@qgis-bot

Description

@qgis-bot

Request for documentation

From pull request qgis/QGIS#65199
Author: @TurboGraphxBeige
QGIS version: 4.0

Adding "Field Calculator" menu item to the attribute table header

PR Description:

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 qgis/QGIS#55266.

Reviving old PR qgis/QGIS#55293 and qgis/QGIS#63287
Started with a fresh PR because last one's commit history was too messy.

492110028-af16ba51-e826-412b-9f83-96517860c453.mp4

AI tool usage

No

Commits tagged with [need-docs] or [FEATURE]

Metadata

Metadata

Assignees

Labels

4.2QGIS 4.2 new featuresGUINeeds to be listed as new menu entry or interaction with main dialog

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions