ColorPropertyContributionItem [message #637578] |
Sun, 07 November 2010 10:12 |
bogdan toma Messages: 39 Registered: February 2010 |
Member |
|
|
Hello all,
I am using GMF runtime 1.2.0 and I some problem using toolbar color picker.(But as I see in source code this is also in 1.4.1)
1. when an element from diagram is selected the org.eclipse.gmf.runtime.diagram.ui.actions.internal.ColorPro pertyContributionItem does not refresh the "thin color bar underneath" the menu item, like it happens when a color is choosen(a thin color bar appears with selected color).
This is strange because font name contribution , font size contribution etc. all changes when diagram selection is done.
As far as i can tell this is a problem of overwritten
/**
* @see org.eclipse.gmf.runtime.common.ui.action.AbstractContributio nItem#refreshItem()
*/
protected void refreshItem() ;
Is this a "bug" or is this the way it was meant to be implemented?
2. The scenario is like this:
- I select an element from diagram
- I go to select a color in toolbar for background color using "More colors" option
- color dialog appears and then I press press "Esc" key on keyboard.
- the selected element gets the last selected color (from a previous selection), which I think should not happen.
I think this comes from implementation of getBrowseColor(). I think selected color from color dialog should be checked for null.
protected RGB getBrowseColor() {
ColorDialog dialog =
new ColorDialog(Display.getCurrent().getActiveShell());
WindowUtil.centerDialog(
dialog.getParent(),
Display.getCurrent().getActiveShell());
if (lastColor != null){
dialog.setRGB(FigureUtilities.integerToRGB(lastColor));
}
dialog.open();
return dialog.getRGB();
}
Again, is this the way it was meant to be implemented?
Sorry for my english.
Thank you.
|
|
|
Powered by
FUDForum. Page generated in 0.02830 seconds