Re: gtk_tree_selection_select_iter after gtk_tree_store_append not working



On Fri, Jul 22, 2011 at 8:40 PM, Denis Washington <denisw online de> wrote:
However, this doesn't work. Removing the "if" conditional and printing out
gtk_tree_selection_get_selected (selection, NULL, NULL) right after
select_iter reveals that only the root element can be selected this way
(printout is 1), while all others don't get selected (printout 0).

Do you mean to say that the iter you are trying to select is a child
of the root element?

Digging a bit deeper, it seems that _gtk_tree_view_find_node(), called from
gtk_tree_selection_select_path(), cannot find an RBNode belonging to the
tree iter's path (it returns TRUE, which makes the next statement silently

In that case, there will be no RBNode until the root element is
expanded.  You cannot select child nodes which are "invisible"; that
is, their parent is in a collapsed state.


regards,

-kris.



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