From 01afc442c73661df677c2b93f4037a21992ee45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 21 Feb 2020 18:28:45 +0100 Subject: Signals: Port connect calls to use callable_mp Remove now unnecessary bindings of signal callbacks in the public API. There might be some false positives that need rebinding if they were meant to be public. No regular expressions were harmed in the making of this commit. (Nah, just kidding.) --- editor/animation_bezier_editor.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'editor/animation_bezier_editor.cpp') diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 69e3c3b19d..e0839a9f27 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -522,7 +522,7 @@ void AnimationBezierTrackEdit::set_undo_redo(UndoRedo *p_undo_redo) { void AnimationBezierTrackEdit::set_timeline(AnimationTimelineEdit *p_timeline) { timeline = p_timeline; - timeline->connect_compat("zoom_changed", this, "_zoom_changed"); + timeline->connect("zoom_changed", callable_mp(this, &AnimationBezierTrackEdit::_zoom_changed)); } void AnimationBezierTrackEdit::set_editor(AnimationTrackEditor *p_editor) { editor = p_editor; @@ -1141,10 +1141,7 @@ void AnimationBezierTrackEdit::set_block_animation_update_ptr(bool *p_block_ptr) void AnimationBezierTrackEdit::_bind_methods() { - ClassDB::bind_method("_zoom_changed", &AnimationBezierTrackEdit::_zoom_changed); - ClassDB::bind_method("_menu_selected", &AnimationBezierTrackEdit::_menu_selected); ClassDB::bind_method("_gui_input", &AnimationBezierTrackEdit::_gui_input); - ClassDB::bind_method("_play_position_draw", &AnimationBezierTrackEdit::_play_position_draw); ClassDB::bind_method("_clear_selection", &AnimationBezierTrackEdit::_clear_selection); ClassDB::bind_method("_clear_selection_for_anim", &AnimationBezierTrackEdit::_clear_selection_for_anim); @@ -1184,7 +1181,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() { play_position->set_mouse_filter(MOUSE_FILTER_PASS); add_child(play_position); play_position->set_anchors_and_margins_preset(PRESET_WIDE); - play_position->connect_compat("draw", this, "_play_position_draw"); + play_position->connect("draw", callable_mp(this, &AnimationBezierTrackEdit::_play_position_draw)); set_focus_mode(FOCUS_CLICK); v_scroll = 0; @@ -1198,7 +1195,7 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() { menu = memnew(PopupMenu); add_child(menu); - menu->connect_compat("id_pressed", this, "_menu_selected"); + menu->connect("id_pressed", callable_mp(this, &AnimationBezierTrackEdit::_menu_selected)); //set_mouse_filter(MOUSE_FILTER_PASS); //scroll has to work too for selection } -- cgit v1.2.3