Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo does not work in inspector if script editor is showing #53424

Open
elvisish opened this issue Oct 5, 2021 · 19 comments
Open

Undo does not work in inspector if script editor is showing #53424

elvisish opened this issue Oct 5, 2021 · 19 comments

Comments

@elvisish
Copy link

elvisish commented Oct 5, 2021


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

3.3.3 stable

System information

Windows 7 64-bit

Issue description

Inspector undo is ignored and irrecoverable if a value is adjusted while script editor is up.

Steps to reproduce

Bring up script editor, change an Inspector value and press undo.

Minimal reproduction project

No response

@EricEzaM
Copy link
Contributor

EricEzaM commented Oct 5, 2021

When you say "press undo", do you mean the shortcut? If yes, it is most likely a duplicate of #52861

@EricEzaM EricEzaM added this to the 3.4 milestone Oct 5, 2021
@elvisish
Copy link
Author

elvisish commented Oct 5, 2021

When you say "press undo", do you mean the shortcut? If yes, it is most likely a duplicate of #52861

Same problem with menu or shortcut key.

@elvisish
Copy link
Author

I'm honestly not sure what's causing this completely broken undo/redo keyboard shortcut situation I have. It just never works, I've gotten it entirely in muscle memory not to try and undo or I'll be severely disappointed as it just does not work. I've tried to build a minimal reproduction but it always works on a fresh project. I've tried cutting down my current project but it starts to work a bit when I remove some files, but redo shortcut won't work. I've given up entirely on inspector undo/redo, but this applies to 3D scene undo/redo shortcuts. I honestly don't know what I can do to fix it, the one thing that really let's Godot down is it's undo/redo, which is such a shame as it's probably the most fundamental part of a tool that should work effortlessly.

@elvisish
Copy link
Author

Sometimes, if I click the 3D view it'll work, then if I click away it'll work, or sometimes the inverse works. Generally speaking I have no trouble with Scene > Undo or Scene > Redo, so why are the shortcuts breaking all the time?

@MightyPrinny
Copy link
Contributor

I can't get the undo shortcut to work anymore, I'm not sure which update messed it up, but I started to notice in 3.4 that the shortcut never works unless I open the Scene menu first.

@Calinou
Copy link
Member

Calinou commented Nov 13, 2021

@MightyPrinny Can you reproduce this in any of the 3.4 betas and RCs to determine when the regression started?

@elvisish
Copy link
Author

I can't get the undo shortcut to work anymore, I'm not sure which update messed it up, but I started to notice in 3.4 that the shortcut never works unless I open the Scene menu first.

Finally, someone else with this problem! It really is a workflow killer, but I only have the problem in inspector, 2D and 3D view (constantly). Have you noticed the problem in Script editor?

@MightyPrinny
Copy link
Contributor

MightyPrinny commented Nov 14, 2021

@Calinou I found that beta 3 is the last version without this problem, I'll try to figure out how to replicate it in an empty project.

@MightyPrinny
Copy link
Contributor

MightyPrinny commented Nov 14, 2021

It seems to start happening immediately after loading a scene from the recent list.

Here's everything I did:
-Load project with some scenes
-Immediately load a scene from the recent list
-Drag something in the 2d editor
-Click somewhere empty
-Ctrl + z -> nothing happens

@elvisish
Copy link
Author

It seems to start happening immediately after loading a scene from the recent list.

Here's everything I did: -Load project with some scenes -Immediately load a scene from the recent list -Drag something in the 2d editor -Click somewhere empty -Ctrl + z -> nothing happens

This is exactly the issue I've been having, I can't figure out what's causing the de-focus or whatever it is, there doesn't sem to be any particular trigger. Try deleting some project files from a duplicate version of your project, sometimes it seems to help (though obviously not a solution, it might help figure the cause).

@elvisish
Copy link
Author

It seems to start happening immediately after loading a scene from the recent list.

Here's everything I did: -Load project with some scenes -Immediately load a scene from the recent list -Drag something in the 2d editor -Click somewhere empty -Ctrl + z -> nothing happens

Has 3.4 RC helped for you?

@kuroodo
Copy link

kuroodo commented Dec 3, 2021

I'm not sure if I am having some Mandela effect problem or not. I remember being able to undo changes in the Scene, Inspector, and Node dock while the script editor is open. When 3.4 came out I started having the issue as described in this post. But I have tried 3.4.1, 3.4, all of the 3.4 betas, I tried 3.2, and even 3.1.2 and the issue exists in ALL versions. So I don't know if my brain is farting, or if this is indeed a new issue. If indeed a new issue, then the issue may not stem from Godot since I personally do not recall having this issue in any version prior to 3.4.

To further describe the issue, when the Script editor is open, ctrl + z and ctrl + y only work for changes made in the script editor. It appears that what happens is that focus is brought on to the script editor. So if you click on the scene dock for example, the text cursor (blinking text edit thing) on the script editor goes away. But upon pressing ctrl + z, the text cursor appears in the text editor.

NOTE: Pressing the undo/redo buttons (Scene -> Undo/Redo) rather than using the shortcuts works as intended for me on 3.4. Also pressing the Scene menu and then pressing the shortcut works. So the only way to undo changes that are not script related is by pressing the buttons themselves, or opening the scene menu/tab and then pressing the shortcut.

Just in case, I am running Windows 10 64 bit version 21H2 OS build 19044.1348

@MightyPrinny
Copy link
Contributor

I'm not sure if I am having some Mandela effect problem or not. I remember being able to undo changes in the Scene, Inspector, and Node dock while the script editor is open. When 3.4 came out I started having the issue as described in this post. But I have tried 3.4.1, 3.4, all of the 3.4 betas, I tried 3.2, and even 3.1.2 and the issue exists in ALL versions. So I don't know if my brain is farting, or if this is indeed a new issue. If indeed a new issue, then the issue may not stem from Godot since I personally do not recall having this issue in any version prior to 3.4.

To further describe the issue, when the Script editor is open, ctrl + z and ctrl + y only work for changes made in the script editor. It appears that what happens is that focus is brought on to the script editor. So if you click on the scene dock for example, the text cursor (blinking text edit thing) on the script editor goes away. But upon pressing ctrl + z, the text cursor appears in the text editor.

NOTE: Pressing the undo/redo buttons (Scene -> Undo/Redo) rather than using the shortcuts works as intended for me on 3.4. Also pressing the Scene menu and then pressing the shortcut works. So the only way to undo changes that are not script related is by pressing the buttons themselves, or opening the scene menu/tab and then pressing the shortcut.

Just in case, I am running Windows 10 64 bit version 21H2 OS build 19044.1348

That might be the same issue I was having, I tried older versions and I noticed it started happening at Godot 3.4 beta 4, I have yet to try the new version so I don't know if this still is a problem.

@kuroodo
Copy link

kuroodo commented Dec 3, 2021

I didn't realize this issue was referencing version 3.3.3. This makes me very intrigued at what's causing it, especially since some of us did not experience this issue until 3.4. But for me now even if I create a fresh project with 3.1.2 or 3.2.3 for example I experience this issue immediately even though I have no memory of experiencing this in the past.

@elvisish
Copy link
Author

elvisish commented Dec 7, 2021

It's still a big problem in 3.4.1rc1.

@Calinou
Copy link
Member

Calinou commented Jan 20, 2022

I can confirm this on 3.x 322ba88. However, I am not sure whether this is actually a bug or a limitation of the undo system sharing the same shortcut for both the script editor and scene editor (which use different undo/redo stacks). Having an unified undo/redo stack would resolve this, but it's a large change that will break compatibility with existing projects (as UndoRedo can be used within projects).

If you focus back on the 2D editor, the undo/redo shortcut will modify the properties instead of modifying the script editor's contents.

@lufog
Copy link
Contributor

lufog commented Jan 24, 2022

I have the same problem in 3.5-beta1 version.

@reduz
Copy link
Member

reduz commented Jan 13, 2023

This looks like a 3.x bug, I can't reproduce in 4.0. Can anyone confirm?

@EricEzaM
Copy link
Contributor

May have been fixed by #71055 in 4.0 as well, that's why can't repro? Not too sure, may be a different issue.

@KoBeWi KoBeWi modified the milestones: 3.5, 3.x Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants