Is there way to change item's parent?



I have two groups, one is nested to another. And i need to add new
group to topmost and nest previously created child to new. I have
implemented dragging, which is performed for now by affecting "x" and
"y" properties via g_object_set ().

Each group has nested rectangle. Events are received by topmost group,
so i can drag entier group, clicking on any element (one time i tried
to drag children rectangles - works fine).

1. If i just add item to new parent, i get two images of item. Old image
seems to just i mirage - it doesn't react for mouse events, but new -
reacts.
2. If i first remove item from old parent - it seems, it
is destroyed; because on subsequential attempt to add item to new
parent i get segmentation fault.
3. Also i tried to remove item from old parent after it is adopted by
new parent, but in this case it doesn't react for events (not dragged
by mouse). And if i try to drag rectangle, nested to topmost group
(appart another rectangle, nested to group, whose parent was changed),
i again get segmentation fault.


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