Merge pull request #7708 from furo321/ctrl-shift-z

Support `Ctrl + Shift + Z` as editor redo hotkey.
This commit is contained in:
Dennis Felsing 2023-12-26 07:55:15 +00:00 committed by GitHub
commit 0376f1cd2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7949,9 +7949,9 @@ void CEditor::Render()
if(m_Dialog == DIALOG_NONE && CLineInput::GetActiveInput() == nullptr)
{
// handle undo/redo hotkeys
if(Input()->KeyPress(KEY_Z) && Input()->ModifierIsPressed())
if(Input()->KeyPress(KEY_Z) && Input()->ModifierIsPressed() && !Input()->ShiftIsPressed())
UndoLastAction();
if(Input()->KeyPress(KEY_Y) && Input()->ModifierIsPressed())
if((Input()->KeyPress(KEY_Y) && Input()->ModifierIsPressed()) || (Input()->KeyPress(KEY_Z) && Input()->ModifierIsPressed() && Input()->ShiftIsPressed()))
RedoLastAction();
// handle brush save/load hotkeys