Skip to content

Commit 8e80127

Browse files
committed
Merge pull request godotengine#109881 from vaner-org/animationtree-focus-steal
Fix overly aggressive focus grabbing by StateMachine and BlendSpaces
2 parents 37a48c8 + 5a7c5ab commit 8e80127

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

editor/animation/animation_blend_space_1d_editor.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
187187

188188
Ref<InputEventMouseMotion> mm = p_event;
189189

190-
if (mm.is_valid() && !blend_space_draw->has_focus()) {
191-
blend_space_draw->grab_focus();
192-
blend_space_draw->queue_redraw();
193-
}
194-
195190
if (mm.is_valid() && dragging_selected_attempt) {
196191
dragging_selected = true;
197192
drag_ofs = ((mm->get_position() - drag_from) / blend_space_draw->get_size()) * ((blend_space->get_max_space() - blend_space->get_min_space()) * Vector2(1, 0));

editor/animation/animation_blend_space_2d_editor.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
282282

283283
Ref<InputEventMouseMotion> mm = p_event;
284284

285-
if (mm.is_valid() && !blend_space_draw->has_focus()) {
286-
blend_space_draw->grab_focus();
287-
blend_space_draw->queue_redraw();
288-
}
289-
290285
if (mm.is_valid() && dragging_selected_attempt) {
291286
dragging_selected = true;
292287
if (!read_only) {

editor/animation/animation_state_machine_editor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,6 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
506506
}
507507

508508
if (mm.is_valid()) {
509-
state_machine_draw->grab_focus();
510-
511509
String new_hovered_node_name;
512510
HoveredNodeArea new_hovered_node_area = HOVER_NODE_NONE;
513511
if (tool_select->is_pressed()) {

0 commit comments

Comments
 (0)