Selaa lähdekoodia

Removed GhostImagefigure for Tooltip preview image

Andreas Mülder 13 vuotta sitten
vanhempi
commit
f3d8d04270

+ 1 - 10
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/submachine/SubStateDecorator.java

@@ -1,8 +1,6 @@
 package org.yakindu.sct.ui.editor.submachine;
 
 import org.eclipse.core.runtime.Assert;
-import org.eclipse.draw2d.ColorConstants;
-import org.eclipse.draw2d.GhostImageFigure;
 import org.eclipse.draw2d.ImageFigure;
 import org.eclipse.draw2d.MouseEvent;
 import org.eclipse.draw2d.MouseListener;
@@ -97,14 +95,7 @@ public abstract class SubStateDecorator extends BaseDecorator {
 				if (diagram != null) {
 					Image renderImage = renderImage(diagram);
 					ImageFigure toolTip = new ImageFigure(renderImage);
-					System.out.println("Image bounds " + renderImage.getBounds());
-					toolTip.setSize(renderImage.getBounds().width, renderImage.getBounds().height);
-					System.out.println("Tooltip bounds " + toolTip.getBounds());
-					GhostImageFigure ghost = new GhostImageFigure(toolTip, 80, ColorConstants.white.getRGB());
-					if (toolTip.getImage() != null)
-						toolTip.getImage().dispose();
-					ghost.setSize(toolTip.getSize().getCopy());
-					decoration.setToolTip(ghost);
+					decoration.setToolTip(toolTip);
 				}
 			}