implement CTRL+Z for undo() and CTRL+Shift+Z for redo()

This commit is contained in:
2018-07-28 19:28:26 +02:00
parent 4a05bda62f
commit a66af9abb8
4 changed files with 14 additions and 6 deletions

View File

@@ -315,6 +315,8 @@ kEventResult NodeCanvas::handle_event(Event* e)
// m_canvas->m_alpha_lock = false;
if (ke->m_key == kKey::KeyTab)
App::I.toggle_ui();
if (ke->m_key == kKey::KeyZ && App::I.keys[(int)kKey::KeyCtrl])
App::I.keys[(int)kKey::KeyShift] ? ActionManager::redo() : ActionManager::undo();
break;
case kEventType::GestureStart:
mouse_capture();