reorder_item


Description:

[ Version ( since = "2.8" ) ]
public bool reorder_item (Item item, Item? parent, int position)

Reorder the specified item within its item tree

Reorders or moves item within an item tree. Requires parent is null or a GroupLayer, else returns error. When parent is not null and item is in parent, reorders item within parent group. When parent is not null and item is not in parent, moves item into parent group. When parent is null, moves item from current parent to top level.

Requires item is in same tree as not null parent, else returns error. Layers, Channels, and Paths are in separate trees.

Requires item is not ancestor of parent, else returns error, to preclude cycles.

Parameters:

this

The image.

item

The item to reorder.

parent

The new parent item.

position

The new position of the item.

Returns:

TRUE on success.