Details panel: clicking a color swatch again while its picker is open leaves an undo transaction open

Summary

Clicking a color property’s swatch in the Details panel a second time, while that property’s Color Picker is already open, leaves an undo transaction open for the rest of the editor session. Pressing OK in the new picker never ends it. While it is open, GEditor->IsTransactionActive() stays true, so everything gated on it stops; in particular PCG pauses all editor-world execution.

What Type of Bug are you experiencing?

Editor

Steps to Reproduce

  1. Open any level and place a Point Light.
  2. Select it. In the Details panel, click the Light Color swatch. The Color Picker opens.
  3. With the picker still open, click the same swatch again. The picker closes and a new one opens.
  4. Pick a color and press OK.
  5. Quit the editor and read the log.

Expected Result

Pressing OK ends the “Edit Light Color” transaction, and no transaction is open afterwards.

Observed Result

The transaction stays open until the editor exits, where the log says:

LogEditorTransaction: Non zero active count in UTransBuffer::Reset

While it is open, GEditor->IsTransactionActive() is true, so everything gated on it stops. In particular PCG pauses all editor-world execution while a transaction is active (pcg.PauseExecutionWhileTransactionActive, default on). In our project every room built by a PCG component and refreshed after the clicks went empty and stayed empty until the editor was restarted.

Affects Versions

5.8

Platform(s)

Mac

Additional Notes

Version: 5.8.4 (CL 58902052, ++UE5+Release-5.8), installed build, macOS 27.2 on Apple Silicon. The code involved has no platform-specific branch: FSlateApplication::RequestDestroyWindow always destroys the window immediately.

Cause, from the 5.8.4 source:

  1. FColorStructCustomization::CreateColorPicker (ColorStructCustomization.cpp:286) begins a transaction and stores its index in the member TransactionIndex, then calls OpenColorPicker.
  2. OpenColorPicker (SColorPicker.cpp:1465) first calls DestroyColorPicker(). That destroys the picker already open, synchronously: SWindow::RequestDestroyWindow → FSlateApplication::DestroyWindowsImmediately.
  3. The destroyed picker’s close callback is the same row’s OnColorPickerWindowClosed (ColorStructCustomization.cpp:480). It calls EndTransaction() once (:496), which closes one of the two nested levels, then TransactionIndex.Reset(), which discards the index the second click has just stored.
  4. When the new picker closes, OnColorPickerWindowClosed finds no index and ends nothing. The destructor’s EndTransaction() (:163) is skipped for the same reason. One level stays open.

Call stack at the old picker window’s destruction, captured with a handler on FSlateApplication::OnWindowBeingDestroyed:

SColorBlock::OnMouseButtonDown
FColorStructCustomization::OnMouseButtonDownColorBlock
FColorStructCustomization::CreateColorPicker
OpenColorPicker
DestroyColorPicker
SWindow::RequestDestroyWindow
FSlateApplication::DestroyWindowsImmediately

Clicking a different color row’s swatch while a picker is open stays balanced: the old row’s callback ends its own level and the new row’s ends the other. Only the same row overwrites its own index.

Suggested fix: destroy any open picker before beginning the new transaction, for example by calling DestroyColorPicker() at the top of FColorStructCustomization::CreateColorPicker, before BeginTransaction, so the old picker’s callback ends the old transaction and clears the index before the new one is stored. Keeping the transaction index per picker window rather than per row would also fix it.

Workaround: none in the editor UI. A plugin can repair it: on OnWindowBeingDestroyed for the Color Picker window, note the active transaction, and a frame later end it if it is still the same transaction and no picker is open. We do this.