Skip to content

Commit

Permalink
Fix node dragging not working when dock is moved
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Jul 21, 2022
1 parent 74be36e commit b42bbca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b42bbca

Please sign in to comment.