Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] Policy problem with part parent hierarchy

I am working on an visual editor based on GEF MVC and have run across a problem I’m not sure how to resolve.
I have just added the concept of visual containers. Containers are just like any other visual object except they can also have children.
The problem is that when I select a child of a container, the policy resolver finds the same policy (TranslateSelectedOnDragPolicy in this case) for both the child part and its parents. This causes the same policy to be initialized multiple times which fails the check uninitialized test in the policy. 
In reality however, it does not make sense that the parent’s policy be used in the case when only the child is selected, but I can’t figure out how to dynamically select the correct policy based on the current part parent structure.

Thanks for any help!

David Dubrow
ddubrow@xxxxxxxxxxxxx





Back to the top