Fix for bug 381426: Events table not showing event rank.
authorPatrick Tasse <patrick.tasse@gmail.com>
Fri, 1 Jun 2012 21:49:38 +0000 (17:49 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Fri, 1 Jun 2012 21:49:38 +0000 (17:49 -0400)
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/virtualtable/TmfVirtualTable.java

index a2e77069950947737aff33ee9a93e5951d056391..0df48185747ca2039ae9b166fda101ed8f6e2d39 100644 (file)
@@ -370,7 +370,15 @@ ITmfEventsFilterProvider {
                         label.addListener(SWT.MouseDown, this);\r
                         label.addListener(SWT.MouseWheel, this);\r
                         final Point size = tooltipShell.computeSize(SWT.DEFAULT, SWT.DEFAULT);\r
-                        Point pt = fTable.toDisplay(event.x, event.y);\r
+                        /*\r
+                         * Bug in Linux.  The coordinates of the event have an origin that excludes the table header but\r
+                         * the method toDisplay() expects coordinates relative to an origin that includes the table header.\r
+                         */\r
+                        int y = event.y;\r
+                        if (System.getProperty("os.name").contains("Linux")) { //$NON-NLS-1$ //$NON-NLS-2$\r
+                            y += fTable.getHeaderHeight();\r
+                        }\r
+                        Point pt = fTable.toDisplay(event.x, y);\r
                         pt.x += BOOKMARK_IMAGE.getBounds().width;\r
                         pt.y += size.y;\r
                         tooltipShell.setBounds(pt.x, pt.y, size.x, size.y);\r
index b3dd76e0233206da9f0137d3f042f996726aec06..a22668e091816754f602bccdf192299851d44e48 100644 (file)
@@ -607,6 +607,10 @@ public class TmfVirtualTable extends Composite {
         return fTable.getItemHeight();
     }
 
+    public int getHeaderHeight() {
+        return fTable.getHeaderHeight();
+    }
+
     public int getTopIndex() {
         return fTableTopEventRank + fFrozenRowCount;
     }
This page took 0.026864 seconds and 5 git commands to generate.