summaryrefslogtreecommitdiff
path: root/scene/gui/tree.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-03-18 07:21:14 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-03-18 07:21:14 +0100
commit021a84e704bf4b0a18df4515c01b83a657dc967c (patch)
tree5feb9d433a4100987f2240f3390ef889872f0d0a /scene/gui/tree.cpp
parent3adc5a45ab8a6a486ee2713f1ef60370c0d94cbe (diff)
parent44fe74bfc3df6ac8251ebc4b678c99a7ad122dbb (diff)
Merge pull request #4083 from SaracenOne/tree_control_cursor_fix
Fix cursor getting locked on tree control
Diffstat (limited to 'scene/gui/tree.cpp')
-rw-r--r--scene/gui/tree.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 483aa47f35..718206dee1 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -2750,6 +2750,15 @@ void Tree::clear() {
ERR_FAIL_COND(blocked>0);
}
+ if (pressing_for_editor) {
+ if (range_drag_enabled) {
+ range_drag_enabled = false;
+ Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
+ warp_mouse(range_drag_capture_pos);
+ }
+ pressing_for_editor = false;
+ }
+
if (root) {
memdelete( root );
root = NULL;
@@ -2759,7 +2768,6 @@ void Tree::clear() {
edited_item=NULL;
popup_edited_item=NULL;
selected_item=NULL;
- pressing_for_editor=false;
update();
};