Undo and Redo are broken with javascript blocks

It goes back multiple steps and sometimes doesn’t allow to redo afterwards. This happens consistently and all you can really do about it is to hope that you have a save file. Or rewritte everything you lost.

As a user I would expect undo and redo to work within a code block. I am not sure if it is supposed to, or if it is meant to treat the whole code block like a single event. If so I would suggest disabling the undo button while writting.

Undo is bugged, and that’s not limited to js blocks. You’ll notice the same multiple undos with the standard events.

Hi all,

I was not sure but as you said Gruk and as i am thinking now on that, i noticed this function works well some times and others fails.

It’s just my opinion: i think such a software as GDevelop, should have a perfect undo/redo function. It would be not professional to let this fonction disrupt.

Are you agree?

A+

Sure, but it isn’t enough to say it should, it has to be made so. Unfortunately it’s not that easy at all.

Totally agree with you Arthur !
It was’nt a criticism in direction of the GDevelop contributors i made.
If it was so easy to do, i suppose there is a long time we would talk of an other topic, would’nt it?

To bring my stone to the problem, may i know where exactly the difficulties are to help developers to correct the dysfonctionment of the undo/redo function ?
I think that developers have used a list with structure to be able to remember what actions must be executed back when user push Undo/Redo button.
Can you tell more about problems encountered and also the logic applied to make the progress of actual Undo/Redo functionnality ?

Thanks by advance to all developers.

And maybe some actions are not correctly saved in the history, this is very improbable but why not.

The best thing todo for help the devs is to record in video with your keyboard input what are you doing when this unro/redo problem appear.

Ok, i’ll do that but the difficulty will be to capture ALL before a bug appears because there is times where the Undo/Redo fonction works well and on others times, this fonction does not work.
I plan from now to save all context and tentatives before use the Undo button.
The important for me will just be not to forget to record my actions! :smile:

Thanks Bouh.