Skip to content

Wrong color presets displayed after saving color palette with multiple ColorPickers in the scene #104223

@FeniXb3

Description

@FeniXb3

Tested versions

System information

Godot v4.4.stable - Windows 11 (build 26100) - Multi-window, 1 monitor - Vulkan (Forward+) - integrated AMD Radeon 780M Graphics (Advanced Micro Devices, Inc.; 32.0.11039.8001) - AMD Ryzen 7 8845HS w/ Radeon 780M Graphics (16 threads)

Issue description

If you have multiple ColorPickers in the scene and each has some color presets, and you will save one as color palette, presets from all ColorPickers will be displayed as colors of this palette. However, the saved palette has only presets from the ColorPicker that was used to save it.

Nagrywanie.ekranu.2025-03-16.095710.mp4

From the code it seems to be a problem with using preset_cache in ColorPicker to display colors, which is static.

Steps to reproduce

  1. Add 2 or more ColorPickers to the scene
  2. Assign different colors to each ColorPicker
  3. Run the game
  4. Open Swatches in each ColorPicker and add current color to presets
  5. Save presets of one ColorPicker as color palette
  6. You should see colors from all ColorPickers displayed as the palette in the one where you saved presets

Minimal reproduction project (MRP)

regression-test-project.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions