Commit c0ce642a authored by Christian Hergert's avatar Christian Hergert

tree: add helper to rebuild node

This allows rebuilding a node without invalidating children.
parent 6c3cfff5
......@@ -1364,3 +1364,25 @@ dzl_tree_node_set_foreground_rgba (DzlTreeNode *self,
self->foreground_rgba_set = !!foreground_rgba;
}
/**
* dzl_tree_node_rebuild:
* @self: a #DzlTreeNode
*
* Rebuilds a node, without invalidating children nodes. If you want to
* ensure that children are also rebuilt, use dzl_tree_node_invalidate().
*
* Since: 3.28
*/
void
dzl_tree_node_rebuild (DzlTreeNode *self)
{
DzlTree *tree;
g_return_if_fail (DZL_IS_TREE_NODE (self));
tree = dzl_tree_node_get_tree (self);
if (tree != NULL)
_dzl_tree_build_node (tree, self);
}
......@@ -77,6 +77,8 @@ void dzl_tree_node_get_area (DzlTreeNode *nod
GdkRectangle *area);
DZL_AVAILABLE_IN_ALL
void dzl_tree_node_invalidate (DzlTreeNode *node);
DZL_AVAILABLE_IN_3_28
void dzl_tree_node_rebuild (DzlTreeNode *self);
DZL_AVAILABLE_IN_ALL
gboolean dzl_tree_node_get_expanded (DzlTreeNode *node);
DZL_AVAILABLE_IN_ALL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment