浏览代码

Fix missing check if shortcut event is handled for Control-nodes

Control-nodes without a shortcut-context were missing a check if
the event was handled, so that a single shortcut-event was passed to
multiple Control-nodes.
Markus Sauermann 2 年之前
父节点
当前提交
57ff04278b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      scene/main/scene_tree.cpp

+ 3 - 0
scene/main/scene_tree.cpp

@@ -942,6 +942,9 @@ void SceneTree::_call_input_pause(const StringName &p_group, CallInputType p_cal
 	}
 
 	for (const ObjectID &id : no_context_node_ids) {
+		if (p_viewport->is_input_handled()) {
+			break;
+		}
 		Node *n = Object::cast_to<Node>(ObjectDB::get_instance(id));
 		if (n) {
 			n->_call_shortcut_input(p_input);