summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2008-12-04 16:59:27 +0000
committerSilenio Quarti <silenio>2008-12-04 16:59:27 +0000
commita4a1f708a2dadf4c5e4b28846c10897c951f57ac (patch)
treef35246fd4a6620885ddb5b2037f57060e96e2124 /bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt
parent908308a6dec9dbc1eba3d970ca252f336f0fcc18 (diff)
downloadeclipse.platform.swt-a4a1f708a2dadf4c5e4b28846c10897c951f57ac.tar.gz
eclipse.platform.swt-a4a1f708a2dadf4c5e4b28846c10897c951f57ac.tar.xz
eclipse.platform.swt-a4a1f708a2dadf4c5e4b28846c10897c951f57ac.zip
257278 - Ctrl-Shift-R does not update correctly on Mac Carbon
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java6
2 files changed, 10 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java
index 337d27382a..2547f81d3a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TableItem.java
@@ -137,7 +137,11 @@ int calculateWidth (int index, GC gc) {
gc.setFont (font);
if (image != null) width += image.getBounds ().width + parent.getGap ();
if (text != null && text.length () > 0) width += gc.stringExtent (text).x;
- if (parent.hooks (SWT.MeasureItem)) {
+ boolean sendMeasure = true;
+ if ((parent.style & SWT.VIRTUAL) != 0) {
+ sendMeasure = cached;
+ }
+ if (sendMeasure && parent.hooks (SWT.MeasureItem)) {
Event event = new Event ();
event.item = this;
event.index = index;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java
index 4f6c8eb593..6924371f61 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TreeItem.java
@@ -229,7 +229,11 @@ int calculateWidth (int index, GC gc) {
gc.setFont (font);
if (image != null) width += image.getBounds ().width + parent.getGap ();
if (text != null && text.length () > 0) width += gc.stringExtent (text).x;
- if (parent.hooks (SWT.MeasureItem)) {
+ boolean sendMeasure = true;
+ if ((parent.style & SWT.VIRTUAL) != 0) {
+ sendMeasure = cached;
+ }
+ if (sendMeasure && parent.hooks (SWT.MeasureItem)) {
Event event = new Event ();
event.item = this;
event.index = index;