Don't allow what treeview initialisation sets as the dimensions to be overwritten with defaults of 0.
This commit is contained in:
parent
bd38b712c6
commit
1658554437
|
@ -155,12 +155,6 @@ ro_treeview *ro_treeview_create(wimp_w window, struct toolbar *toolbar,
|
|||
tv->w = window;
|
||||
tv->tb = toolbar;
|
||||
|
||||
tv->tree = tree_create(flags, &ro_tree_callbacks, tv);
|
||||
if (tv->tree == NULL) {
|
||||
free(tv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Set the tree redraw origin at a default 0,0 RO units. */
|
||||
|
||||
tv->origin.x = 0;
|
||||
|
@ -181,6 +175,12 @@ ro_treeview *ro_treeview_create(wimp_w window, struct toolbar *toolbar,
|
|||
|
||||
tv->drag = TREE_NO_DRAG;
|
||||
|
||||
tv->tree = tree_create(flags, &ro_tree_callbacks, tv);
|
||||
if (tv->tree == NULL) {
|
||||
free(tv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Record the callback info. */
|
||||
|
||||
tv->callbacks = callbacks;
|
||||
|
|
Loading…
Reference in New Issue