diff options
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 574b18731e..38f3d865d4 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -886,7 +886,7 @@ void ScriptTextEditor::_breakpoint_item_pressed(int p_idx) { _edit_option(breakpoints_menu->get_item_id(p_idx)); } else { code_editor->goto_line(breakpoints_menu->get_item_metadata(p_idx)); - code_editor->get_text_editor()->call_deferred(SNAME("center_viewport_to_caret")); //Need to be deferred, because goto uses call_deferred(). + callable_mp((TextEdit *)code_editor->get_text_editor(), &TextEdit::center_viewport_to_caret).call_deferred(0); // Needs to be deferred, because goto uses call_deferred(). } } @@ -1273,27 +1273,27 @@ void ScriptTextEditor::_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(); |