Re: GtkTreeModel doesn't emit rows-reordered

On Fri, 2005-01-14 at 13:56 -0800, Jimmy Do wrote:
> Hi everyone,
> I have a GtkTreeView and I set it to have reorderable rows so that
> users can drag and drop rows to reorder the underlying tree model, but
> the "rows-reordered" signal never gets emitted when I rearrange the
> rows with drag and drop.
> I've googled for this and it seems a few other people have experienced
> the same problem. This post seems to indicate that GtkTreeModel was
> designed *not* to emit "rows-reordered" for drag and drop:
> Is there a reason why the signal isn't emitted? It would handy to have
> because I need to know when my GtkTreeModel changes so that I can
> write the new arrangement to a file.

The reason is that rows-reordered is only for reordering the children of
a single node, whereas dnd allows you to move nodes between branches in 
a tree. Therefore intra-tree dnd is implemented as remove+add.
Admittedly not ideal, it also breaks row references (although I keep
thinking that it should be possible for the tree view to recognize this
case, and update the row references after the drop...)


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