@@ -2135,7 +2135,8 @@ void AnimationTrackEdit::_notification(int p_what) {
21352135 Ref<Texture2D> icon = EditorNode::get_singleton ()->get_object_icon (node, " Node" );
21362136 const Vector2 icon_size = Vector2 (1 , 1 ) * get_theme_constant (SNAME (" class_icon_size" ), EditorStringName (Editor));
21372137
2138- draw_texture_rect (icon, Rect2 (Point2 (ofs, (get_size ().height - icon_size.y ) / 2 ).round (), icon_size));
2138+ icon_rect = Rect2 (Point2 (ofs, (get_size ().height - check->get_height ()) / 2 ).round (), icon->get_size ());
2139+ draw_texture_rect (icon, icon_rect);
21392140 icon_cache = icon;
21402141
21412142 text = String () + node->get_name () + " :" + anim_path.get_concatenated_subnames ();
@@ -2749,6 +2750,10 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
27492750 return TTR (" Toggle this track on/off." );
27502751 }
27512752
2753+ if (icon_rect.has_point (p_pos)) {
2754+ return TTR (" Select node in scene." );
2755+ }
2756+
27522757 // Don't overlap track keys if they start at 0.
27532758 if (path_rect.has_point (p_pos + Size2 (type_icon->get_width (), 0 ))) {
27542759 return animation->track_get_path (track);
@@ -2960,6 +2965,15 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
29602965 accept_event ();
29612966 }
29622967
2968+ if (icon_rect.has_point (pos)) {
2969+ EditorSelection *editor_selection = EditorNode::get_singleton ()->get_editor_selection ();
2970+ editor_selection->clear ();
2971+ Node *n = root->get_node_or_null (node_path);
2972+ if (n) {
2973+ editor_selection->add_node (n);
2974+ }
2975+ }
2976+
29632977 // Don't overlap track keys if they start at 0.
29642978 if (path_rect.has_point (pos + Size2 (type_icon->get_width (), 0 ))) {
29652979 clicking_on_name = true ;
0 commit comments