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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
lv_obj.c
lv_core/lv_obj.c
+9
-2
No files found.
lv_core/lv_obj.c
View file @
80cb93f8
...
@@ -343,11 +343,14 @@ void lv_obj_clean(lv_obj_t *obj)
...
@@ -343,11 +343,14 @@ void lv_obj_clean(lv_obj_t *obj)
*/
*/
void
lv_obj_invalidate
(
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'*/
/*Invalidate the object only if it belongs to the 'act_scr'*/
lv_obj_t
*
obj_scr
=
lv_obj_get_screen
(
obj
);
lv_obj_t
*
obj_scr
=
lv_obj_get_screen
(
obj
);
if
(
obj_scr
==
lv_scr_act
()
||
if
(
obj_scr
==
lv_scr_act
()
||
obj_scr
==
lv_layer_top
()
||
obj_scr
==
lv_layer_top
()
||
obj_scr
==
lv_layer_sys
())
{
obj_scr
==
lv_layer_sys
())
{
/*Truncate recursively to the parents*/
/*Truncate recursively to the parents*/
lv_area_t
area_trunc
;
lv_area_t
area_trunc
;
lv_obj_t
*
par
=
lv_obj_get_parent
(
obj
);
lv_obj_t
*
par
=
lv_obj_get_parent
(
obj
);
...
@@ -364,6 +367,7 @@ void lv_obj_invalidate(lv_obj_t * obj)
...
@@ -364,6 +367,7 @@ void lv_obj_invalidate(lv_obj_t * obj)
while
(
par
!=
NULL
)
{
while
(
par
!=
NULL
)
{
union_ok
=
lv_area_union
(
&
area_trunc
,
&
area_trunc
,
&
par
->
coords
);
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
);
par
=
lv_obj_get_parent
(
par
);
}
}
...
@@ -750,12 +754,15 @@ void lv_obj_report_style_mod(lv_style_t * style)
...
@@ -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
)
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
;
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
);
lv_obj_t
*
par
=
lv_obj_get_parent
(
obj
);
par
->
signal_func
(
par
,
LV_SIGNAL_CHILD_CHG
,
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