Issue with gtk TreeListModel create function triggering too often

Hi, I have an issue with gtk TreeListModel create function triggering too often:

tree_expand

I have a small repro here: https://github.com/njust/tree_view_issue
My TreeListModel code looks like the following:

    let tree_list_model = gtk4::TreeListModel::new(model, false, false, |obj| {
        if let Some(name) = obj.property("name").ok().and_then(|p|p.get::<String>().ok()) {
            println!("Expand: {}", name);
        }

        let list_store = gio::ListStore::new(PersonObject::static_type());
        let persons = get_persons(5);
        for person in persons {
            list_store.append(&person);
        }
        Some(list_store.upcast::<gio::ListModel>())
    });

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.