Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
0fc2b3aa
Commit
0fc2b3aa
authored
Aug 27, 2017
by
Rémi Verschelde
Committed by
GitHub
Aug 27, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10660 from Noshyaar/pr-tree
Tree: fix RMB click collapses next item
parents
00f0884e
5e889cce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
tree.cpp
scene/gui/tree.cpp
+15
-13
No files found.
scene/gui/tree.cpp
View file @
0fc2b3aa
...
...
@@ -2473,22 +2473,24 @@ void Tree::_gui_input(Ref<InputEvent> p_event) {
Point2
pos
=
b
->
get_position
()
-
bg
->
get_offset
();
cache
.
click_type
=
Cache
::
CLICK_NONE
;
if
(
show_column_titles
&&
b
->
get_button_index
()
==
BUTTON_LEFT
)
{
if
(
show_column_titles
)
{
pos
.
y
-=
_get_title_button_height
();
if
(
pos
.
y
<
0
)
{
pos
.
x
+=
cache
.
offset
.
x
;
int
len
=
0
;
for
(
int
i
=
0
;
i
<
columns
.
size
();
i
++
)
{
len
+=
get_column_width
(
i
);
if
(
pos
.
x
<
len
)
{
cache
.
click_type
=
Cache
::
CLICK_TITLE
;
cache
.
click_index
=
i
;
//cache.click_id=;
update
();
break
;
if
(
b
->
get_button_index
()
==
BUTTON_LEFT
)
{
pos
.
x
+=
cache
.
offset
.
x
;
int
len
=
0
;
for
(
int
i
=
0
;
i
<
columns
.
size
();
i
++
)
{
len
+=
get_column_width
(
i
);
if
(
pos
.
x
<
len
)
{
cache
.
click_type
=
Cache
::
CLICK_TITLE
;
cache
.
click_index
=
i
;
//cache.click_id=;
update
();
break
;
}
}
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment