summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2005-05-09 17:54:20 +0000
committerFelipe Heidrich <fheidric>2005-05-09 17:54:20 +0000
commit1a6a67f9df122e586724d5c54e1a58995ea075df (patch)
treed739e4a3d933e180b9139371876cb8a1918105dc /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
parentdcd9f7243ae1ad05751547f983b76748a1e6687b (diff)
downloadeclipse.platform.swt-1a6a67f9df122e586724d5c54e1a58995ea075df.tar.gz
eclipse.platform.swt-1a6a67f9df122e586724d5c54e1a58995ea075df.tar.xz
eclipse.platform.swt-1a6a67f9df122e586724d5c54e1a58995ea075df.zip
94003
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
index 432a148549..f967e9e5a3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java
@@ -818,7 +818,11 @@ public void setImage (Image image) {
ImageList imageList = parent.imageList;
if (imageList == null) imageList = parent.imageList = new ImageList ();
int imageIndex = imageList.indexOf (image);
- if (imageIndex == -1) imageIndex = imageList.add (image);
+ if (imageIndex == -1) {
+ imageIndex = imageList.add (image);
+ } else {
+ imageList.put (imageIndex, image);
+ }
int /*long*/ pixbuf = imageList.getPixbuf (imageIndex);
OS.gtk_image_set_from_pixbuf (imageHandle, pixbuf);
OS.gtk_widget_show (imageHandle);