ListCompartmentEditPart bug? - cannot select figures in compartment [message #546669] |
Tue, 13 July 2010 17:25 |
emil salageanu Messages: 94 Registered: June 2010 Location: Nice, France |
Member |
|
|
Hello,
Anyone had problems with Compartments with List Layout?
If the layout of a compartement is set to "list", the figures inside the compartment can no longer be selected: no selection feedback is given and the properties view is not updated (but the "delete" button deletes a "non-slected" element wich makes me think the selection is performed but there is a bug in the selection, like an event not being sent).
In order to specify a List Layout for a compartment, one should set, in the gmfgen file, the list property to true for a compartment edit part generation, then the EditPart corresponding to that compartment will extend ListCompartmentEditPart (rather than ShapeCompartmentEditPart).
I think there is a problem in the ListCompartmentEditPart class.
Cheers,
Emil.
[Updated on: Wed, 14 July 2010 08:43] Report message to a moderator
|
|
|
|
|
Re: ListCompartmentEditPart bug? - cannot select figures in compartment [message #640444 is a reply to message #546669] |
Mon, 22 November 2010 07:19 |
|
Hi,
Thanks for your solution, I had the same problem
One minor detail; if your list compartment does not support moving items here and there (normal behaviour) it's better to turn off the drag feedback like below:
/**
* @generated NOT
*/
protected void createDefaultEditPolicies() {
// ...
NonResizableEditPolicy nonResizableEditPolicy = new NonResizableEditPolicy();
nonResizableEditPolicy.setDragAllowed(false);
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, nonResizableEditPolicy);
}
Otherwise a feedback figure will be shown when attempting to move child edit parts around (and it does not get erased).
Hope this helps.
- Asiri
|
|
|
Powered by
FUDForum. Page generated in 0.02976 seconds