diff options
author | corvid <corvid@lavabit.com> | 2011-01-23 02:35:01 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-01-23 02:35:01 +0000 |
commit | 5f55026c7f2e393749f65bbe6f284f76fabd6398 (patch) | |
tree | a604d5dfc3cd5cf81a7a915cfa3fb3f5e49925e0 /dw/fltkui.cc | |
parent | 1ed203635c66fe5373c5cff6e28faa7942ae8d5b (diff) |
add tree items directly to a parent
When adding them by using a path argument, it wouldn't add duplicates
with the same name. And maybe pushGroup and popGroup will resurface after all.
Diffstat (limited to 'dw/fltkui.cc')
-rw-r--r-- | dw/fltkui.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dw/fltkui.cc b/dw/fltkui.cc index 10c6889d..12089090 100644 --- a/dw/fltkui.cc +++ b/dw/fltkui.cc @@ -1004,7 +1004,8 @@ void FltkListResource::widgetCallback (Fl_Widget *widget, void *data) void FltkListResource::addItem (const char *str, bool enabled, bool selected) { - Fl_Tree_Item *item = ((Fl_Tree *)widget)->add(str); + Fl_Tree *tree = (Fl_Tree *) widget; + Fl_Tree_Item *item = tree->add(tree->root(), str); int index = itemsSelected.size (); item->activate(enabled); |