Update deferred calls to use Callables

This commit is contained in:
kobewi 2023-12-18 15:46:56 +01:00
parent 8297ec949b
commit 0e8f90f4c8
92 changed files with 192 additions and 350 deletions

View file

@ -352,27 +352,27 @@ void TextEditor::_edit_option(int p_op) {
switch (p_op) {
case EDIT_UNDO: {
tx->undo();
tx->call_deferred(SNAME("grab_focus"));
callable_mp((Control *)tx, &Control::grab_focus).call_deferred();
} break;
case EDIT_REDO: {
tx->redo();
tx->call_deferred(SNAME("grab_focus"));
callable_mp((Control *)tx, &Control::grab_focus).call_deferred();
} break;
case EDIT_CUT: {
tx->cut();
tx->call_deferred(SNAME("grab_focus"));
callable_mp((Control *)tx, &Control::grab_focus).call_deferred();
} break;
case EDIT_COPY: {
tx->copy();
tx->call_deferred(SNAME("grab_focus"));
callable_mp((Control *)tx, &Control::grab_focus).call_deferred();
} break;
case EDIT_PASTE: {
tx->paste();
tx->call_deferred(SNAME("grab_focus"));
callable_mp((Control *)tx, &Control::grab_focus).call_deferred();
} break;
case EDIT_SELECT_ALL: {
tx->select_all();
tx->call_deferred(SNAME("grab_focus"));
callable_mp((Control *)tx, &Control::grab_focus).call_deferred();
} break;
case EDIT_MOVE_LINE_UP: {
code_editor->move_lines_up();