mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 03:58:33 +08:00
fix edit_set_int/set_double(issue #250)
This commit is contained in:
parent
7d1213d4b1
commit
ebbc4160dc
@ -2,6 +2,7 @@
|
||||
|
||||
* 2019/10/14
|
||||
* 修改widget\_set\_value把value当uint32的BUG.
|
||||
* edit\_set\_int/double后调用text layout(感谢俊杰提供补丁)。
|
||||
|
||||
* 2019/10/13
|
||||
* 增加stream\_shdlc文档。
|
||||
|
@ -941,16 +941,22 @@ double edit_get_double(widget_t* widget) {
|
||||
}
|
||||
|
||||
ret_t edit_set_int(widget_t* widget, int32_t value) {
|
||||
edit_t* edit = EDIT(widget);
|
||||
return_value_if_fail(widget != NULL, RET_BAD_PARAMS);
|
||||
|
||||
wstr_from_int(&(widget->text), value);
|
||||
text_edit_layout(edit->model);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
ret_t edit_set_double(widget_t* widget, double value) {
|
||||
edit_t* edit = EDIT(widget);
|
||||
return_value_if_fail(widget != NULL, RET_BAD_PARAMS);
|
||||
|
||||
wstr_from_float(&(widget->text), value);
|
||||
text_edit_layout(edit->model);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user