Skip to content

Fix editor shortcuts during play mode#812

Merged
adriengivry merged 2 commits into
Overload-Technologies:mainfrom
Gopmyc:804
May 19, 2026
Merged

Fix editor shortcuts during play mode#812
adriengivry merged 2 commits into
Overload-Technologies:mainfrom
Gopmyc:804

Conversation

@Gopmyc
Copy link
Copy Markdown
Contributor

@Gopmyc Gopmyc commented May 18, 2026

Description

Prevents editor keyboard shortcuts from running outside edit mode, so Ctrl+S and related scene shortcuts no longer affect the runtime scene while playing.

Related Issue(s)

Fixes #804

Review Guidance

Check the edit-mode guards in Editor::Update and MenuBar::HandleShortcuts.

Screenshots/GIFs

N/A

AI Usage Disclosure

N/A

Checklist

  • My code follows the project's code style guidelines
  • When applicable, I have commented my code, particularly in hard-to-understand areas
  • When applicable, I have updated the documentation accordingly
  • My changes don't generate new warnings or errors
  • I have reviewed and take responsibility for all code in this PR (including any AI-assisted contributions)

Copy link
Copy Markdown
Member

@adriengivry adriengivry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these shortcuts should remain available even in play mode.
We should always be able to:

  • Change scene (CTRL + N)
  • Delete an object
  • etc..

The only actions to disable are EditorActions::SaveSceneChanges() and EditorActions::SaveAs().

Adding this to both these functions should suffice:

if (m_editorMode != EEditorMode::EDIT)
{
    return;
}

@Gopmyc
Copy link
Copy Markdown
Contributor Author

Gopmyc commented May 19, 2026

Most of these shortcuts should remain available even in play mode. We should always be able to:

  • Change scene (CTRL + N)
  • Delete an object
  • etc..

The only actions to disable are EditorActions::SaveSceneChanges() and EditorActions::SaveAs().

Adding this to both these functions should suffice:

if (m_editorMode != EEditorMode::EDIT)
{
    return;
}

Indeed…
It's fixed !

@Gopmyc Gopmyc requested a review from adriengivry May 19, 2026 02:41
@adriengivry adriengivry merged commit 0fce489 into Overload-Technologies:main May 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Save shortcut still works while the scene is playing

2 participants