Multi selection and Properties View [message #160774] |
Tue, 07 December 2004 09:19  |
Eclipse User |
|
|
|
Originally posted by: alain.origlia.impika.com
Hi all,
In short, in my graphic editor consider I've got 2 editparts with 1 color
property which is displayed in the Properties View. I use a color descriptor
to edit the color property of the editparts. Everything is okay when I
select each editpart independently. I can edit the color and make it change
into the corresponding figure .
When I select several editparts at a time, the Properties View displays the
properties of the first selected part. Ok, this can be very useful for
example to put the same color to all parts.
But if I decide to push the cancel button of the font dialog and I deselect
the editparts, the color property value of all the previous selected parts
is set to the value of the first one.
Into the code, I saw that because of the deselection , the property sheet
page calls the method selectionChanged and make the viewer call
applyEditorValue which propagate the same value to all the IPropertySource
objects. Each model is then updated and it is the reason why I finally have
a modified color for a part even if I decided to cancel the modification
operation.
Is there something I missed? A workaround would be to prevent
multiselection. How?
Thanks for your help,
Alain
|
|
|
|
|
Re: Multi selection and Properties View [message #160865 is a reply to message #160818] |
Tue, 07 December 2004 12:01  |
Eclipse User |
|
|
|
Originally posted by: alain.origlia.impika.com
Ooooops, I'm the king of the post! FontDialog was a ColorDialog... of
course.
Ok, thank you so much, setting the property descriptor incompatibilty to
always true works fine for me and is a good workaround to my problem.
But in fact, I actually edit the color with the ColorPropertyDescriptor
class of the platform in the Properties View. I use the default cell editor
provided with this class.
I just wrote the implementation of the interface IPropertySource for my
model and added the color descriptor. Do I need to do something else?
Thanks.
"Randy Hudson" <none@us.ibm.com> a
|
|
|
Powered by
FUDForum. Page generated in 0.25082 seconds