node that change its has-child state in treemodel



Hi !

I have the following problem with my treemodel : answer to the question "does this node have childs ?" is time consuming. As this question is asked to every sun of a node when it is expanded, I want to have the following behaviour :
When a node is expanded, tree_model_has_child allways returns TRUE.
When the node is selected, or its expander is clicked, then take the time to compute and tell the view : for this node, I returned TRUE in the method tree_model_has_child but this has changed, now it is false.

I tried to emit the signal "row-has-child-toggled" when the signal "row-expanded" is emitted by the view and the answer changes but this does not work : treemodel_has_child is called again and answers FALSE but tree_model_iter_children is also called which is not correct.

I have put handlers on each signal I spoke of and they are emitted correctly.

Can anyone tell me where I am wrong ?

Thanks by advance,

Denis




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]