Indexed image: adding colors to the colormap and using them in the image does not change the image display
Environment/Versions
- GIMP version: 2.99
- Package: built locally
- Operating System: Linux
Description of the bug
When working with an indexed image which originally had only one color, then adding additional colors to the colormap, and using them in the image changes the layers previews in the Layers dialog, but not the image display.
Found this problem while creating the sample images for issue #10549. Seems to be limited to the current sessions, and saved images are Ok.
Reproduction
Is the bug reproducible?
Reproduction steps:
- Create an image filled with transparency
- Select a rectangle, fill with a color (I used red in my sample image)
- Create a few copies of the layer
- Convert the image to indexed mode
- Check the colormap, should only contain one color (red in my case)
- Add more colors, change them to something else (I used green and blue in my sample images)
- Use these colors to change the color of the selected rectangles on some layers to a different color
- Notice how the layer previews change, but the image display does not (in my case, everything did show up as red)
- However, when only one layer is set to be visible, the expected changed color is displayed
Saving and reloading the image fixed this, so this seems to be some session-only effect.
Expected result:
- Layer preview and image display show the same content
Actual result:
- Layer preview changes, but image display remains unchanged