slint icon indicating copy to clipboard operation
slint copied to clipboard

TextInput: Add undo/redo support

Open Waqar144 opened this issue 1 year ago • 3 comments
trafficstars

#474

Waqar144 avatar Feb 07 '24 13:02 Waqar144

Olivier, do you have any preferences here?

I prefer using SharedVector

ogoffart avatar Feb 07 '24 14:02 ogoffart

@Waqar144 Would you like me to take over to take care of the binding bits, or would you like to give it a try?

tronical avatar Feb 07 '24 14:02 tronical

I had to change things quite a bit to make it work:

  • added a pop() method to SharedVector
  • UndoItem is now a struct with a UndoItemKind field, previously it was an enum. I had to change it because the old struct was non-trivial

Waqar144 avatar Feb 07 '24 17:02 Waqar144