Treeview: Redraw full text on treeview search text sets.

This commit is contained in:
Michael Drake 2020-05-23 21:58:56 +01:00
parent 52d0583ace
commit 6a1511ce99

View File

@ -360,6 +360,26 @@ static inline void treeview__cw_invalidate_area(
}
/**
* Corewindow callback wrapper: Request a full redraw of the window
*
* \param[in] tree The treeview to request redraw on.
*/
static inline void treeview__cw_full_redraw(
const struct treeview *tree)
{
if (tree->cw_t != NULL) {
static const struct rect r = {
.x0 = 0,
.y0 = 0,
.x1 = REDRAW_MAX,
.y1 = REDRAW_MAX,
};
tree->cw_t->invalidate(tree->cw_h, &r);
}
}
/**
* Get height used by treeview's search bar (or 0 if not present).
*
@ -4890,6 +4910,8 @@ nserror treeview_set_search_string(
return NSERROR_UNKNOWN;
}
treeview__cw_full_redraw(tree);
return NSERROR_OK;
}