|[GEF4] Disable default selection policy [message #1732912]
||Mon, 23 May 2016 01:54
| Colin Sharples
Registered: July 2009
Location: Wellington, New Zealand
I have a default FXFocusAndSelectOnClickPolicy installed on all my parts to handle basic selection (create selection handles etc).|
There's various times when I'd like to disable this policy while some action is happening, and then turn it on again when finished.
For example, when creating shapes, I use an IFXOnClickPolicy on the root part so that the user can create a shape by clicking on the places where bendpoints will go. If this happens to be where an existing part sits (it's perfectly valid in my model for shapes to overlap), then that existing part gets selected, which i don't want. In some cases, I will need to be able to use a different selection policy, e.g. to attach the new part to an existing part.
Another case is where I add some widgets to manipulate shape properties in a context menu - for something like the width of a line I use a Spinner. I would prefer the context menu to stay open until the user clicks away from the part, but currently the context menu is dismissed after every click on the Spinner, because it seems that even clicking on the Spinner generates change in selection.
Can I mark a policy as being not active? Or would it be better to do something with the FXClickDragTool?
CTG Games Ltd
Wellington, New Zealand
Powered by FUDForum
. Page generated in 0.04268 seconds