Search Unity

ListView Undo with SerializeReference list broken?

Discussion in 'UI Toolkit' started by Alex-Chouls, May 12, 2022.

  1. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,663
    When I bind a ListView to a SerializeReference list and move items around, Undo doesn't seem to work properly. It seems to break when there's more than 1 derived type in the list. With one type in the list, Undo works properly. With more than one type, Undo no longer moves the items back to their original positions.

    Is this a known issue? I imagine I could setup an undo callback to call RebuildItems, but I'm trying to do this with minimal hacks/workarounds.
     
  2. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,663
    I heard this was maybe fixed in 2022.1, but just tried it and it seems to be still broken. I'm building a lot of tools using ListView and SerializeReference lists so it's a little worrying that undo/redo doesn't work properly in either latest LTS or tech stream. Is this a known issue or am I doing something wrong?
     
  3. oscarAbraham

    oscarAbraham

    Joined:
    Jan 7, 2013
    Posts:
    431
    I've seen some problems too in 2022 with managed references, but I believe there were less problems. What kinds of problems are you seen in 2022.1?