diff options
author | Felipe Heidrich <fheidric> | 2005-05-06 21:54:28 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2005-05-06 21:54:28 +0000 |
commit | 2a99b12f3f121573f6a87579f2b9aa6f85abbe1b (patch) | |
tree | 1ccae11726d1bfda84c3262c36b1f503f900ddc9 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java | |
parent | 285048d733ba2ac7ac939aae339235bf286f43d0 (diff) | |
download | eclipse.platform.swt-2a99b12f3f121573f6a87579f2b9aa6f85abbe1b.tar.gz eclipse.platform.swt-2a99b12f3f121573f6a87579f2b9aa6f85abbe1b.tar.xz eclipse.platform.swt-2a99b12f3f121573f6a87579f2b9aa6f85abbe1b.zip |
94003
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java index 9c815a1b5c..c17b7b30b6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java @@ -464,10 +464,11 @@ public void setImage (Image image) { checkWidget (); if ((style & SWT.SEPARATOR) != 0) return; this.image = image; + if (imageList != null) imageList.dispose (); + imageList = null; if (image != null) { - if (imageList == null) imageList = imageList = new ImageList (); - int imageIndex = imageList.indexOf (image); - if (imageIndex == -1) imageIndex = imageList.add (image); + imageList = new ImageList (); + int imageIndex = imageList.add (image); int /*long*/ pixbuf = imageList.getPixbuf (imageIndex); OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf); OS.gtk_widget_hide (labelHandle); |