From b926e984e31644295104f1b8ce752991ec2557a0 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Tue, 18 May 2021 00:16:51 +0200 Subject: [PATCH] Check hasp_local_style_attr last --- src/hasp/hasp_attribute.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/hasp/hasp_attribute.cpp b/src/hasp/hasp_attribute.cpp index 766ab807..258af713 100644 --- a/src/hasp/hasp_attribute.cpp +++ b/src/hasp/hasp_attribute.cpp @@ -1971,13 +1971,7 @@ void hasp_process_obj_attribute(lv_obj_t* obj, const char* attribute, const char break; default: { - bool result; - hasp_local_style_attr(obj, attribute, attr_hash, payload, update, result); - if(result) { - ret = ATTR_TYPE_METHOD_OK; - } else { - ret = ATTR_NOT_FOUND; - } + break; // not found } } @@ -2017,6 +2011,16 @@ void hasp_process_obj_attribute(lv_obj_t* obj, const char* attribute, const char } } + if(ret == ATTR_NOT_FOUND) { + bool result; + hasp_local_style_attr(obj, attribute, attr_hash, payload, update, result); + if(result) { + ret = ATTR_TYPE_METHOD_OK; + } else { + ret = ATTR_NOT_FOUND; + } + } + // Positive return codes have returned a value, negative are warnings if(update && ret > 0) return; // done