Fix node dragging not working when dock is moved

This commit is contained in:
kobewi 2022-07-21 23:57:52 +02:00
parent 74be36e622
commit b42bbca266

View file

@ -72,7 +72,7 @@ void SceneTreeDock::input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && (mb->get_button_index() == MouseButton::LEFT || mb->get_button_index() == MouseButton::RIGHT)) {
if (mb->is_pressed() && scene_tree->get_rect().has_point(mb->get_position())) {
if (mb->is_pressed() && scene_tree->get_rect().has_point(scene_tree->get_local_mouse_position())) {
tree_clicked = true;
} else if (!mb->is_pressed()) {
tree_clicked = false;