2011/9/12 Damián Nohales <damiannoha...@gmail.com>: > Hello there! > > I have a gtk.TreeView using a gtk.ListStore model, which is a list of music > tracks. I've setted the "reorderable" property to TRUE in the gtk.TreeView > object and I'm using a gtk.TreeIter to save the current playing item, called > "current_track". > > Well suppose that I have 5 music tracks on my list and the second track is > playing, so the path associated to "current_track" when I use > "model.get_path(current_track)" is (1,). When I drag the first element below > the second, now "current_track" path is (0,), but, when I drag the row > associated with "current_track" (now the first row), to another position, > the path of "current_track" is None. > > Is this the normal behavior or am I doing something wrong?
I'm pretty sure that moving the row current_track points to will invalidate the gtk.TreeIter you have, as the row gets deleted and re-created elsewhere, which would be why you're seeing None for the path. You should be able to check if this is the case by using ListStore.iter_is_valid(). I would add some logic to the drag_data_received signal to deal with this case. -- Neil Muller drnlmul...@gmail.com I've got a gmail account. Why haven't I become cool? _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/