浏览代码

Fix viewport not updating mouse pos on click.

Closes #47594. See further discussion there. Thanks to @Bhu1-V for the investigation which led to this fix.
EricEzaM 4 年之前
父节点
当前提交
7c9bd81578
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/main/viewport.cpp

+ 1 - 0
scene/main/viewport.cpp

@@ -1830,6 +1830,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
 		Control *over = nullptr;
 		Control *over = nullptr;
 
 
 		Point2 mpos = mb->get_position();
 		Point2 mpos = mb->get_position();
+		gui.last_mouse_pos = mpos;
 		if (mb->is_pressed()) {
 		if (mb->is_pressed()) {
 			Size2 pos = mpos;
 			Size2 pos = mpos;
 			if (gui.mouse_focus_mask) {
 			if (gui.mouse_focus_mask) {