diff options
author | Bogdan Gheorghe <gheorghe> | 2008-01-21 20:15:33 +0000 |
---|---|---|
committer | Bogdan Gheorghe <gheorghe> | 2008-01-21 20:15:33 +0000 |
commit | f43e57890fc6f476815884f9c2bf682f2c3f532c (patch) | |
tree | 0037a3bd39c37cbbab11a367671b713b759a87cc /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java | |
parent | 0c959d10533d504fdf92e09305acd272b6eb2eae (diff) | |
download | eclipse.platform.swt-f43e57890fc6f476815884f9c2bf682f2c3f532c.tar.gz eclipse.platform.swt-f43e57890fc6f476815884f9c2bf682f2c3f532c.tar.xz eclipse.platform.swt-f43e57890fc6f476815884f9c2bf682f2c3f532c.zip |
166187 TableItem#getBounds(0) incorrect when adding columns in asyncExec
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java index 61600ff7df..0eb589f393 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java @@ -459,7 +459,8 @@ public Rectangle getBounds (int index) { rect.width -= w [0] + buffer [0]; } } - return new Rectangle (rect.x, rect.y, rect.width + 1, rect.height + 1); + int width = OS.gtk_tree_view_column_get_visible (column) ? rect.width + 1 : 0; + return new Rectangle (rect.x, rect.y, width, rect.height + 1); } /** @@ -528,7 +529,8 @@ public Rectangle getBounds () { rect.width = Math.max (0, right - rect.x); } } - return new Rectangle (rect.x, rect.y, rect.width + 1, rect.height + 1); + int width = OS.gtk_tree_view_column_get_visible (column) ? rect.width + 1 : 0; + return new Rectangle (rect.x, rect.y, width, rect.height + 1); } /** @@ -763,7 +765,8 @@ public Rectangle getImageBounds (int index) { OS.gtk_cell_renderer_get_size (pixbufRenderer, parentHandle, null, null, null, w, null); rect.width = w [0]; } - return new Rectangle (rect.x, rect.y, rect.width, rect.height + 1); + int width = OS.gtk_tree_view_column_get_visible (column) ? rect.width : 0; + return new Rectangle (rect.x, rect.y, width, rect.height + 1); } /** @@ -983,7 +986,8 @@ public Rectangle getTextBounds (int index) { rect.width = Math.max (0, right - rect.x); } } - return new Rectangle (rect.x, rect.y, rect.width + 1, rect.height + 1); + int width = OS.gtk_tree_view_column_get_visible (column) ? rect.width + 1 : 0; + return new Rectangle (rect.x, rect.y, width, rect.height + 1); } /** |