diff options
author | Silenio Quarti <silenio> | 2004-05-28 18:53:51 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2004-05-28 18:53:51 +0000 |
commit | bd1daec6445447923e0ad0f1099b60a10bae0fa9 (patch) | |
tree | b721b002e4511a619b0d0e2aff5facf1ea07d695 | |
parent | 31020d369e8caf4b44f9ea21873e2bd1cce1e7e0 (diff) | |
download | eclipse.platform.swt-bd1daec6445447923e0ad0f1099b60a10bae0fa9.tar.gz eclipse.platform.swt-bd1daec6445447923e0ad0f1099b60a10bae0fa9.tar.xz eclipse.platform.swt-bd1daec6445447923e0ad0f1099b60a10bae0fa9.zip |
*** empty log message ***
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java index 6c11ee773b..c421839044 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/Table.java @@ -874,9 +874,11 @@ int drawItemProc (int browser, int id, int property, int itemState, int theRect, imageBounds = image.getBounds (); itemWidth += imageBounds.width + 2; } - TableColumn column = columns [columnIndex]; - if ((column.style & SWT.CENTER) != 0) x += (width - itemWidth) / 2; - if ((column.style & SWT.RIGHT) != 0) x += width - itemWidth; + if (columnCount != 0) { + TableColumn column = columns [columnIndex]; + if ((column.style & SWT.CENTER) != 0) x += (width - itemWidth) / 2; + if ((column.style & SWT.RIGHT) != 0) x += width - itemWidth; + } if (image != null) { gc.drawImage (image, 0, 0, imageBounds.width, imageBounds.height, x, y + (height - imageBounds.height) / 2, imageBounds.width, imageBounds.height); x += imageBounds.width + 2; |