BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
89731ae7
Commit
89731ae7
authored
Jul 27, 2017
by
Gabor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lv_obj: lv_obj_set_parent: bugfix, send CHILD_CHG signal to the old parent too
parent
592a54f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lv_obj.c
lv_obj/lv_obj.c
+3
-1
No files found.
lv_obj/lv_obj.c
View file @
89731ae7
...
@@ -420,12 +420,14 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
...
@@ -420,12 +420,14 @@ void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent)
old_pos
.
x
=
lv_obj_get_x
(
obj
);
old_pos
.
x
=
lv_obj_get_x
(
obj
);
old_pos
.
y
=
lv_obj_get_y
(
obj
);
old_pos
.
y
=
lv_obj_get_y
(
obj
);
lv_obj_t
*
old_par
=
obj
->
par
;
ll_chg_list
(
&
obj
->
par
->
child_ll
,
&
parent
->
child_ll
,
obj
);
ll_chg_list
(
&
obj
->
par
->
child_ll
,
&
parent
->
child_ll
,
obj
);
obj
->
par
=
parent
;
obj
->
par
=
parent
;
lv_obj_set_pos
(
obj
,
old_pos
.
x
,
old_pos
.
y
);
lv_obj_set_pos
(
obj
,
old_pos
.
x
,
old_pos
.
y
);
/*Notify the original parent because one of its children is lost*/
/*Notify the original parent because one of its children is lost*/
o
bj
->
par
->
signal_f
(
obj
->
par
,
LV_SIGNAL_CHILD_CHG
,
NULL
);
o
ld_par
->
signal_f
(
old_
par
,
LV_SIGNAL_CHILD_CHG
,
NULL
);
/*Notify the new parent about the child*/
/*Notify the new parent about the child*/
parent
->
signal_f
(
parent
,
LV_SIGNAL_CHILD_CHG
,
obj
);
parent
->
signal_f
(
parent
,
LV_SIGNAL_CHILD_CHG
,
obj
);
...
...
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