Renamed text layer automatically renamed when editted
Environment/Versions
- GIMP version: 2.10.34
- Package: Installer via Windows Store (using link from gimp.org)
- Operating System: Windows 10
Description of the bug
A text layer that is renamed only via the layer attributes dialog will have its name overwritten when the text is editted.
Reproduction
Is the bug reproducible?
Reproduction steps:
- Create a new image
- Create a new text layer using the text tool
- Write some text in it, e.g. 'Original' - observe that the name of the text layer becomes 'Original'
- Right click the layer in the layers view
- Choose Edit Layer Attributes...
- Change the name of the layer, e.g. to 'Renamed'
- Click OK - observe that the name of the text layer is now 'Renamed'
- With the text tool still (or again) selected, click in the text field in the image and edit its contents, e.g. add 'a' in the middle
…
Expected result: The text layer, having been explicitly renamed (to 'Renamed' in the example), retains that name.
Actual result: The test layer's name is reset to the name generated automatically from the text ('Origainal' in the example).
Additional information
This automated renaming upon edit does not occur if the text layer is renamed directly in the layers view, either by double clicking its name or by pressing F2 when the layer is selected. Renaming the text layer directly in the layers view and then renaming it again via the layer attributes dialog does not revert to the erroneous behaviour: the newly set name via the layer attributes dialog is now retained as expected.
The observed behaviour suggests some flag or additional data being set when renaming directly via the layers view, which is not done when changing the name via the layer attributes dialog.
This report assumes that the intended behaviour is for an explicitly provided layer name to be kept rather than being overwritten with a new name generated from the editted text. In either case the behaviour is currently inconsistent. (Searching the internet regarding this issue gave some evidence that the behaviour expected by this report is in line with what users expect, but no in-depth research was done.)
Originally found on a 2.10.14 installation from a plain installer from gimp.org.