Gdevelop: Undo and Redo doesn't work in the event sheet at all

Created on 10 Sep 2018  路  15Comments  路  Source: 4ian/GDevelop

Describe the bug

It seems that it's not implemented yet - you can't actually undo an action in the event sheet. I am not sure if we actually have it. Need to check

To Reproduce

Delete an event, then hit ctrl+z - it doesnt work
Move an event, ctrl+z - doesn't work
Change parameters of an event - ctrl+z doesn't work

Try using undo from the menu - doesn't work

Other details

This is possibly a missing feature. We do have undo/redo in the scene editor, but not in the event sheet. I wonder if using undo in the event sheet actually triggers an undo in the scene editor. It is worth investigating how its implemented in the scene editor

All 15 comments

Strange, I've tested and was able to Ctrl+Z a drag'n'dropped move of an action.
I'm on macOS, maybe it's related? What is your GDevelop version and OS?

EDIT: This should be implemented both in terms of shortcut and in the toolbar. Can you double check with the toolbar buttons?

I will try again later today after work.
I am on Windows 10, running the latest release - beta51

Works fine here, Windows 10 Latest GDevelop compiled from source. I can ctrl+z and ctrl+y to undo anything you can copy and paste... On this track and from the Discord chat last night it would be very nice to be able to copy/paste/drag etc groups and also multi selected items, not yet implemented I think.

copy/paste/drag etc groups

It should be possible to copy/paste them (as well as any event) and drag them too.

multi selected items

Yep it's not supported for now. I created a card for this: https://trello.com/c/h927zcDM/155-support-dragndrop-for-multiple-events-like-actions-conditions to track the need for this.

Same problem, no Undo / Redo with shortcut but i have the button in tollbars this button work.
Copy / past shortcuts works.
GDevelop 5.0.0-beta51 based on GDevelop.js 4.0.97-0-release
Windows 10, 17134.228

Strange shortcut work on web-app, but not on desktop

Ok so I guess there is possibly something wrong with shortcut handling on Windows.

If someone has the development version running, can you try adding console.log("hello world") in newIDE/app/src/EventsSheet/index.js inside the function undo = () => { and redo = () => { (just before if (!canUndo(this.state.history)) return; and if (!canRedo(this.state.history)) return;) and then see if the "hello world" messages are appearing when you press Ctrl+Z or Ctrl+Y?

Strange shortcut work on web-app, but not on desktop

So definitely an issue with Electron and Windows. Might be the Edit menu that should be removed/disabled as it's possible that it's "stealing" the shortcuts.

I'm out on the road all day so cannot test, but when I try to right click a group on win 10 the menu pops up for a brief moment, maybe 0.1 seconds and then disappears. I guessed it wasn't supported yet?

@4ian I will give this a try at home later :)

@blurymind Thanks let me know how it goes :)

Shortcuts and toolbar work here (Windows 7, latest update, custom build), but I've noticed moving events doesn't generate changes history (moving instruction does).

If you right click on a Comment or Group event after you have given it input focus you get the very brief menu popup. If you are not editing it then the menu works as it should. Probably correct behaviour but would be better if the menu doesn't appear at all.

Events are definitely not generating change history on Windows 10

@4ian very strange, when I run a build from git, undo/redo works on:

  • deleting an event
  • moving an action/condition
  • Moving an event row seems to trigger two undo steps (try deleting a condition, then moving the event row it was on, then when you undo once- gd will move it back to where it was, but also bring back the condition you deleted)
    ... however it scrolls the event sheet to the top

It doesn work on:

  • adding a condition/action

The hello message gets printed. On the actual compiled release build here on git -it doesnt work at all:
https://github.com/4ian/GDevelop/releases/tag/v5.0.0-beta51
Undo/redo in the event sheet is disabled in the release build!

I've noticed moving events doesn't generate changes history

Correct! I've fixed this. :)

Moving an event row seems to trigger two undo steps

This is because moving events does not generate changes history as Lizard-13 mentioned, so it looks like there are two steps done in once (but in reality, there was no step registered).

It doesn work on:
adding a condition/action

Could you double check this? I think you may have been confused by moving events that is not registering a step? I've been able to add an action and undo/redo it.

I've also fixed the case where you drag an action/condition while pressing Ctrl (or Cmd) to duplicate the action/condition (this would not register a step, like moving events, so undo/redo will go like "2 steps" backward/forward).

Ok turns out that I fixed shortcuts for events sheet a while ago after beta 51 was out! So should be fixed in beta 52 :D Sorry for the confusion!

Thank you @4ian
I think we can close this now :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Jose-Moreno picture Jose-Moreno  路  5Comments

BWPanda picture BWPanda  路  4Comments

ddabrahim picture ddabrahim  路  4Comments

Bouh picture Bouh  路  3Comments

PascalLadalle picture PascalLadalle  路  3Comments