@@ -2177,7 +2177,8 @@ void AnimationTrackEdit::_notification(int p_what) {
21772177 Ref<Texture2D> icon = EditorNode::get_singleton ()->get_object_icon (node, " Node" );
21782178 const Vector2 icon_size = Vector2 (1 , 1 ) * get_theme_constant (SNAME (" class_icon_size" ), EditorStringName (Editor));
21792179
2180- draw_texture_rect (icon, Rect2 (Point2 (ofs, (get_size ().height - icon_size.y ) / 2 ).round (), icon_size));
2180+ icon_rect = Rect2 (Point2 (ofs, (get_size ().height - check->get_height ()) / 2 ).round (), icon->get_size ());
2181+ draw_texture_rect (icon, icon_rect);
21812182 icon_cache = icon;
21822183
21832184 text = String () + node->get_name () + " :" + anim_path.get_concatenated_subnames ();
@@ -2805,6 +2806,10 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
28052806 return TTR (" Toggle this track on/off." );
28062807 }
28072808
2809+ if (icon_rect.has_point (p_pos)) {
2810+ return TTR (" Select node in scene." );
2811+ }
2812+
28082813 // Don't overlap track keys if they start at 0.
28092814 if (path_rect.has_point (p_pos + Size2 (type_icon->get_width (), 0 ))) {
28102815 return animation->track_get_path (track);
@@ -3016,6 +3021,15 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
30163021 accept_event ();
30173022 }
30183023
3024+ if (icon_rect.has_point (pos)) {
3025+ EditorSelection *editor_selection = EditorNode::get_singleton ()->get_editor_selection ();
3026+ editor_selection->clear ();
3027+ Node *n = root->get_node_or_null (node_path);
3028+ if (n) {
3029+ editor_selection->add_node (n);
3030+ }
3031+ }
3032+
30193033 // Don't overlap track keys if they start at 0.
30203034 if (path_rect.has_point (pos + Size2 (type_icon->get_width (), 0 ))) {
30213035 clicking_on_name = true ;
0 commit comments