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
b5309040
Commit
b5309040
authored
Jan 02, 2017
by
Rémi Verschelde
Committed by
GitHub
Jan 02, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7341 from bruno-ortiz/master
Bugfixes for Tree node
parents
0b2771bd
4b9a9685
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
16 deletions
+6
-16
tree.cpp
scene/gui/tree.cpp
+6
-16
No files found.
scene/gui/tree.cpp
View file @
b5309040
...
...
@@ -1405,11 +1405,7 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c
if
(
select_mode
==
SELECT_ROW
)
{
if
(
p_selected
==
p_current
)
{
if
(
!
c
.
selected
)
{
if
(
p_selected
==
p_current
&&
!
c
.
selected
)
{
c
.
selected
=
true
;
selected_item
=
p_selected
;
selected_col
=
0
;
...
...
@@ -1419,24 +1415,17 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c
emitted_row
=
true
;
}
//if (p_col==i)
// p_current->selected_signal.call(p_col);
}
// p_current->selected_signal.call(p_col);
}
else
{
if
(
c
.
selected
)
{
}
else
if
(
c
.
selected
)
{
c
.
selected
=
false
;
//p_current->deselected_signal.call(p_col);
}
}
}
else
if
(
select_mode
==
SELECT_SINGLE
||
select_mode
==
SELECT_MULTI
)
{
if
(
!
r_in_range
&&
&
selected_cell
==&
c
)
{
if
(
!
selected_cell
.
selected
)
{
selected_cell
.
selected
=
true
;
...
...
@@ -1447,6 +1436,8 @@ void Tree::select_single_item(TreeItem *p_selected, TreeItem *p_current, int p_c
emit_signal
(
"cell_selected"
);
if
(
select_mode
==
SELECT_MULTI
)
emit_signal
(
"multi_selected"
,
p_current
,
i
,
true
);
else
if
(
select_mode
==
SELECT_SINGLE
)
emit_signal
(
"item_selected"
);
}
else
if
(
select_mode
==
SELECT_MULTI
&&
(
selected_item
!=
p_selected
||
selected_col
!=
i
))
{
...
...
@@ -2935,8 +2926,7 @@ void Tree::item_selected(int p_column,TreeItem *p_item) {
void
Tree
::
item_deselected
(
int
p_column
,
TreeItem
*
p_item
)
{
if
(
select_mode
==
SELECT_MULTI
)
{
if
(
select_mode
==
SELECT_MULTI
||
select_mode
==
SELECT_SINGLE
)
{
p_item
->
cells
[
p_column
].
selected
=
false
;
}
update
();
...
...
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