Closed ghost closed 5 years ago
Might be related or not, but I found out that some editor plugins clear the undo history under certain conditions. For example, the shader editor does that if a new shader is created in the inspector while a shader is already being edited. As a result, it not only clears actions done on a resource, it also clears whatever was done since Godot is open. (that happened in 2.1.2 already though)
Hum, ok, I tried a simple project and the undo works, I've tested in some project and only in mine undo not works. When I used godot 2.1.2 in this same project the undo works perfectly. I'm not using any shaders, it's just a project with normal resources.
I've found many errors with the undo feature, it would be nice if each view (2d/3d/script) had their own separate histories, and crtl+z changed the current one.
I just find myself having to mash undo for things to undo, like 3-10 presses for one change sometimes, and I'm not sure why this happens.
I guess we should go over all uses of the editor's undoredo and clean them up...
That's about 202 commit_action
lines, 12 clear_history
lines, and a few other uses here and there...
PRs too? Mine uses this global undo too...
@Zylann Well, PRs are to be reviewed by reviewers, though feel free to check if you aren't doing something weird there.
Well... I'm clearing the whole history, like a few other plugins, which is not nice.
A better option would have been to include the target resource in the undo action, but because UndoRedo is global, you would have to undo changes to the resource before being able to undo what you did on unrelated stuff before. That also produces the behaviour where you think undo does nothing, but is actually undoing changes you made on some resource you don't see in the current context^^
So an undo history that is attached to a given resource, context or object would be nice (using weakrefs).
I did a few fixes in the 3.0 branch, where I think it works properly
On May 1, 2017 5:40 PM, "Marc" notifications@github.com wrote:
Well... I'm clearing the whole history, which is not nice. A better option would have been to include the target resource in the undo action, but because UndoRedo is global, you would have to undo changes to the resource before being able to undo what you did on unrelated stuff before.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/8580#issuecomment-298357190, or mute the thread https://github.com/notifications/unsubscribe-auth/AF-Z21g13AowrKpbWLHZvcdjWQyE0sVkks5r1fz5gaJpZM4NMUZc .
Just a little note: in the script editor the undo works great, but my game cannot undo on the 2d view editor
I have noticed a tiny oddity with this: undo doesn't work if you have not moved your mouse since the last action.
Do certain actions (seen with moving an item, toggling visibility, moving or deleting a vertex on a polygon2d, changing node order) and keep the mouse still. Mash undo and it'll do nothing. Now move the mouse even a tiny bit and now undo works again.
Note that a still mouse after changing node order the mouse pointer keeps a hand as if it still thinks dragging is still occurring, so possibly it's getting locked on mouse input and that's why undo stops working until the mouse is moved.
EDIT: It occurs with duplicating nodes via keyboard shortcut so this is a larger issue.
First of all thank you for your report and sorry for the delay.
We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.
We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us. Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about its current status here?
For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.
Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.
Thanks in advance.
Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.
In 3.0.2: I found that Ctrl+Z stops working in the scene if you have the shader editor open, even if you explicitely focus the scene tree or the viewport. Undo basically gets taken by the shader editor regardless. Closing the shader editor then makes you able to undo things in the scene.
This might not be only the shader editor, though. I suspect AnimationPlayer and other lower-panel editors have the issue too.
The opposite also happens in the script editor: if you write stuff, then click on the scene tree but NOT necessarily on a node (which is still visible), you'd expect to be able to undo the actions you do in it, regardless of which main screen is open. But no, you end up undoing script changes. The catch to this is, if you select nodes in the tree, they often change the main screen automatically, but that doesn't help for nodes that are not specifically tied to a 2D or 3D world (such as Node
, Timer
or HttpRequest
).
This issue is quite old and lacks visibility, so IMO it would be better to open a new one against the master branch, describing what the current state is for undo-related issues.
Still happening, needs a fix desperately. I have never seen so many bad decisions in the GUI. Eg: you can't run with F5 if you are in an input field, you have to press ESC every time. Shader window closing and I have to click multiple times to re-open the editor. This is just off the top of my mind, and critical to be fixed sooner than most other stuff since if it's unusable, other stuff don't matter.
@roman-sitewits Please open a new issue for that, it's likely unrelated. Also, note that editor shortcut handling has been rewritten for 4.0 and should no longer conflict due to focus issues. I doubt it can be backported in a backwards-compatible manner though.
I have never seen so many bad decisions in the GUI.
It's a bug, not an intentional decision :slightly_smiling_face:
Just want to comment that info/redo shortcuts are still amazingly broken and unreliable.
Hey guys, just click Undo in the scene tab and it will work
Operating system or device - Godot version: Linux XUbuntu 16.04.1
Issue description:
The undo shortcut not works, not undo some modification. In previous godot version (2.1.2) the undo works but bad, sometimes it works sometimes not. Now in Godot 2.1.3 it stops to work completely.
Steps to reproduce: Just press Ctrl + Z
Link to minimal example project: