Open KoBeWi opened 1 year ago
I feel this is an odd reason to disable the shortcut. We can surely find a way to avoid the freezing on size change.
Can we make the Ctrl + mouse wheel zoom setting not persist across restarts? There should be no need to save EditorSettings in this case.
Can we make the Ctrl + mouse wheel zoom setting not persist across restarts?
It's doable, but not sure if that's what users would expect.
I feel like the editor freezing itself shouldn't happen in the first place. I understand why it does, but no other IDE would ever freeze like this.
Independent of a freeze this is an issue that should be addressed IMO. I also encounter accidental script zooms, often enough to be a nuisance. This particular shortcut is just too error prone. There should be either a way to disable it or a way to remap it to a different shortcut that doesn't get triggered accidentally so often.
For the freeze there is already an issue on the main repo (https://github.com/godotengine/godot/issues/82144), but regardless of that... I find the zoom in the script editor very annoying. In every code editor that has it. I never "use" it on purpose, always accidentally, and then struggle to figure out which font size it used to be as I adjust it back. Disabling it would be a huge QOL improvement.
Definitely agree. I had so many times where I tried to scroll but ended up zooming out the script editor which takes AGES for some reason. Edit: Implemented this in godot#94480
godot#94480 was closed because the creator of the PR wasn't able to rebase it. Could someone else look into this? Seems like an easy fix, but I myself have only experience with basic merging..
I created borrowed the fix and opened a new PR https://github.com/godotengine/godot/pull/97313
However, I think the better solution is to add the scrolling zoom as a shortcut setting, then user can remove the shortcut. Because intuitively it is a shortcut. I would expect it to be in the shortcut setting instead of a random flag in the main editor setting.
Describe the project you are working on
Game with GDScript.
Describe the problem or limitation you are having in your project
When writing some code in the built-in editor, I accidentally zoom the code surprisingly often. This causes editor settings save after ~2 seconds, which freezes the whole editor for a few seconds. If I don't undo the change quick enough, I'm getting another freeze after I reset the zoom. This is outrageous waste of time and there is no way to disable it.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add a way to disable script editor zoom shortcut, probably with an editor setting.
An alternative solution is of course fixing the freeze, but the editor setting for font size sits in
interface/editor
, which causes theme invalidation with every change. The only fix I can think of is moving this to another section.Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Disable this https://github.com/godotengine/godot/blob/d31794c4a26e5e10fc30c34a1ae9722fd9f50123/editor/code_editor.cpp#L821-L829
If this enhancement will not be used often, can it be worked around with a few lines of script?
With a good amount of hacks, probably.
Is there a reason why this should be core and not an add-on in the asset library?
It's much easier to implement in the source itself.