summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2005-08-09 21:47:42 +0000
committerSilenio Quarti <silenio>2005-08-09 21:47:42 +0000
commit1bd4a6d238f246b1a33b1e165b82bcbcf963d2f9 (patch)
tree9154af8097c4b055540299cee6a46dd6b0d473c8 /bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
parent4e692e594829c957204f8759719ba27bd5c7bed5 (diff)
downloadeclipse.platform.swt-1bd4a6d238f246b1a33b1e165b82bcbcf963d2f9.tar.gz
eclipse.platform.swt-1bd4a6d238f246b1a33b1e165b82bcbcf963d2f9.tar.xz
eclipse.platform.swt-1bd4a6d238f246b1a33b1e165b82bcbcf963d2f9.zip
45708 & 4862 - recursive dispose
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
index 87e1b4ad94..ae00677c43 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/carbon/org/eclipse/swt/widgets/TabFolder.java
@@ -235,6 +235,7 @@ void destroyItem (TabItem item) {
index++;
}
if (index == count) return;
+ redrawWidget (handle, false);
int selectionIndex = OS.GetControl32BitValue (handle) - 1;
--count;
OS.SetControl32BitMaximum (handle, count);
@@ -243,9 +244,13 @@ void destroyItem (TabItem item) {
if (count == 0) {
items = new TabItem [4];
}
+ for (int i = index; i < count; i++) {
+ items [i].update ();
+ }
if (count > 0 && index == selectionIndex) {
setSelection (Math.max (0, selectionIndex - 1), true);
}
+ invalidateVisibleRegion (handle);
}
public Rectangle getClientArea () {
@@ -465,14 +470,17 @@ int kEventControlSetFocusPart (int nextHandler, int theEvent, int userData) {
return OS.eventNotHandledErr;
}
-void releaseWidget () {
- int count = OS.GetControl32BitMaximum (handle);
- for (int i=0; i<count; i++) {
- TabItem item = items [i];
- if (!item.isDisposed ()) item.releaseResources ();
+void releaseChildren (boolean destroy) {
+ if (items != null) {
+ for (int i=0; i<items.length; i++) {
+ TabItem item = items [i];
+ if (item != null && !item.isDisposed ()) {
+ item.releaseChildren (false);
+ }
+ }
+ items = null;
}
- items = null;
- super.releaseWidget ();
+ super.releaseChildren (destroy);
}
void removeControl (Control control) {