Skip to content

Commit 5a7c5ab

Browse files
committed
Fix overly aggressive focus stealing by StateMachine and BlendSpaces
1 parent 8e458d1 commit 5a7c5ab

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
@@ -188,11 +188,6 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
188188

189189
Ref<InputEventMouseMotion> mm = p_event;
190190

191-
if (mm.is_valid() && !blend_space_draw->has_focus()) {
192-
blend_space_draw->grab_focus();
193-
blend_space_draw->queue_redraw();
194-
}
195-
196191
if (mm.is_valid() && dragging_selected_attempt) {
197192
dragging_selected = true;
198193
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
@@ -283,11 +283,6 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
283283

284284
Ref<InputEventMouseMotion> mm = p_event;
285285

286-
if (mm.is_valid() && !blend_space_draw->has_focus()) {
287-
blend_space_draw->grab_focus();
288-
blend_space_draw->queue_redraw();
289-
}
290-
291286
if (mm.is_valid() && dragging_selected_attempt) {
292287
dragging_selected = true;
293288
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)