Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 152750

Summary: ToolTip incorrectly rendered upon second activation
Product: [Tools] GEF Reporter: Micha Riser <eclipse>
Component: GEF-Legacy Draw2dAssignee: gef-inbox <gef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 3.2   
Target Milestone: 3.4.1 (Ganymede SR1)   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Micha Riser CLA 2006-08-03 11:55:27 EDT
Upon first activation the tool tip figure is shown correctly with a one-pixel size border around it. But upon second (and following) activation, the border does not go around but it looks like a shadow on the bottom and right side.

***********             Text   **
*  Text   *     vs.     *********
***********             *********

Following code demonstrates the behaviour.

// -----
import org.eclipse.draw2d.*;
import org.eclipse.draw2d.Label;
import org.eclipse.swt.widgets.*;

public class ToolTipBug {
  
  public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell(display);
    FigureCanvas fc = new FigureCanvas(shell);
    
    Label label = new Label("Hello, World");
    label.setToolTip(new Label("Tool Tip"));
    fc.setContents(label);
    
    fc.pack();
    shell.open();
    
    while(!shell.isDisposed()) {
      if (!display.readAndDispatch()) {
        display.sleep();
      }
    }
    display.dispose();
  }

}
// -----

Does not seem to happen under windows.
Comment 1 Micha Riser CLA 2009-02-03 12:58:53 EST
Works for me now in gef version 3.4.1.v20080806
Comment 2 Alexander Nyßen CLA 2011-01-07 11:29:18 EST
Closing as fixed in 3.4.1 due to last comment.