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
80cb93f8
Commit
80cb93f8
authored
May 16, 2018
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't invalidate hidden objects
parent
a3ad4b36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
lv_obj.c
lv_core/lv_obj.c
+11
-4
No files found.
lv_core/lv_obj.c
View file @
80cb93f8
...
...
@@ -343,11 +343,14 @@ void lv_obj_clean(lv_obj_t *obj)
*/
void
lv_obj_invalidate
(
lv_obj_t
*
obj
)
{
if
(
lv_obj_get_hidden
(
obj
))
return
;
/*Invalidate the object only if it belongs to the 'act_scr'*/
lv_obj_t
*
obj_scr
=
lv_obj_get_screen
(
obj
);
if
(
obj_scr
==
lv_scr_act
()
||
obj_scr
==
lv_layer_top
()
||
obj_scr
==
lv_layer_sys
())
{
obj_scr
==
lv_layer_sys
())
{
/*Truncate recursively to the parents*/
lv_area_t
area_trunc
;
lv_obj_t
*
par
=
lv_obj_get_parent
(
obj
);
...
...
@@ -363,7 +366,8 @@ void lv_obj_invalidate(lv_obj_t * obj)
/*Check through all parents*/
while
(
par
!=
NULL
)
{
union_ok
=
lv_area_union
(
&
area_trunc
,
&
area_trunc
,
&
par
->
coords
);
if
(
union_ok
==
false
)
break
;
/*If no common parts with parent break;*/
if
(
union_ok
==
false
)
break
;
/*If no common parts with parent break;*/
if
(
lv_obj_get_hidden
(
par
))
return
;
/*If the parent is hidden then the child is hidden and won't be drawn*/
par
=
lv_obj_get_parent
(
par
);
}
...
...
@@ -750,12 +754,15 @@ void lv_obj_report_style_mod(lv_style_t * style)
*/
void
lv_obj_set_hidden
(
lv_obj_t
*
obj
,
bool
en
)
{
if
(
!
obj
->
hidden
)
lv_obj_invalidate
(
obj
);
/*Invalidate when not hidden (hidden objects are ignored) */
obj
->
hidden
=
en
==
false
?
0
:
1
;
if
(
!
obj
->
hidden
)
lv_obj_invalidate
(
obj
);
/*Invalidate when not hidden (hidden objects are ignored) */
lv_obj_t
*
par
=
lv_obj_get_parent
(
obj
);
par
->
signal_func
(
par
,
LV_SIGNAL_CHILD_CHG
,
obj
);
lv_obj_invalidate
(
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