Skip to content

Commit

Permalink
fix some signal function if debug asssert is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Dec 7, 2019
1 parent f6f5f69 commit da2ee84
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/lv_objx/lv_ddlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@ static lv_res_t lv_ddlist_scrl_signal(lv_obj_t * scrl, lv_signal_t sign, void *
/* Include the ancient signal function */
res = ancestor_scrl_signal(scrl, sign, param);
if(res != LV_RES_OK) return res;
if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, "");

lv_obj_t * ddlist = lv_obj_get_parent(scrl);

Expand Down
1 change: 1 addition & 0 deletions src/lv_objx/lv_roller.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ static lv_res_t lv_roller_scrl_signal(lv_obj_t * roller_scrl, lv_signal_t sign,
/* Include the ancient signal function */
res = ancestor_scrl_signal(roller_scrl, sign, param);
if(res != LV_RES_OK) return res;
if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);

lv_indev_t * indev = lv_indev_get_act();
int32_t id = -1;
Expand Down
10 changes: 7 additions & 3 deletions src/lv_objx/lv_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,13 @@ uint16_t lv_sw_get_anim_time(const lv_obj_t * sw)
*/
static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
{
lv_res_t res;
if(sign == LV_SIGNAL_GET_TYPE) {
res = ancestor_signal(sw, sign, param);
if(res != LV_RES_OK) return res;
return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);
}

lv_sw_ext_t * ext = lv_obj_get_ext_attr(sw);

/*Save the current (old) value before slider signal modifies it. It will be required in the
Expand All @@ -289,12 +296,9 @@ static lv_res_t lv_sw_signal(lv_obj_t * sw, lv_signal_t sign, void * param)
lv_event_cb_t event_cb = sw->event_cb;
sw->event_cb = NULL;

lv_res_t res;
/* Include the ancient signal function */

res = ancestor_signal(sw, sign, param);
if(res != LV_RES_OK) return res;
if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, LV_OBJX_NAME);

sw->event_cb = event_cb;

Expand Down

0 comments on commit da2ee84

Please sign in to comment.