reordering nodes in GtkTreeView



Is there some way to easily move a node and it's children? Or some other way
to fix this problem:

Data in my tree view look like:

parent
  child
  child
  ..
parent
 child
 ..
child
..

So, child could be moved anywhere, but parent should always be at root. Now
if I set the treeview reorderable, parents can be dragged under othere
parents, which isn't allowed. I managed to check use "row_changed" signal to
figure out that such condition exists, but I can't figure out how to move
the node to top level without deleting it and reinserting all it's children.

Other way to fix that would be to abort reordering if it's at invalid
position, would this be possible somehow?




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