File tree Expand file tree Collapse file tree 7 files changed +13
-0
lines changed
bundles/org.eclipse.swt/Eclipse SWT
cocoa/org/eclipse/swt/widgets
common/org/eclipse/swt/widgets
gtk/org/eclipse/swt/widgets
win32/org/eclipse/swt/widgets Expand file tree Collapse file tree 7 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -704,6 +704,7 @@ public void setID (int id) {
704704@ Override
705705public void setImage (Image image ) {
706706 checkWidget ();
707+ if (this .image == image ) return ;
707708 if ((style & SWT .SEPARATOR ) != 0 ) return ;
708709 super .setImage (image );
709710 nsItem .setImage (image != null ? image .handle : null );
Original file line number Diff line number Diff line change @@ -1058,6 +1058,7 @@ public void setEnabled (boolean enabled) {
10581058 */
10591059public void setDisabledImage (Image image ) {
10601060 checkWidget ();
1061+ if (this .disabledImage == image ) return ;
10611062 if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
10621063 if ((style & SWT .SEPARATOR ) != 0 ) return ;
10631064 disabledImage = image ;
@@ -1093,6 +1094,7 @@ boolean setFocus () {
10931094 */
10941095public void setHotImage (Image image ) {
10951096 checkWidget ();
1097+ if (this .hotImage == image ) return ;
10961098 if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
10971099 if ((style & SWT .SEPARATOR ) != 0 ) return ;
10981100 hotImage = image ;
@@ -1102,6 +1104,7 @@ public void setHotImage (Image image) {
11021104@ Override
11031105public void setImage (Image image ) {
11041106 checkWidget ();
1107+ if (this .image == image ) return ;
11051108 if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
11061109 if ((style & SWT .SEPARATOR ) != 0 ) return ;
11071110 super .setImage (image );
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ void releaseWidget () {
176176 */
177177public void setImage (Image image ) {
178178 checkWidget ();
179+ if (this .image == image ) return ;
179180 if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
180181 this .image = image ;
181182}
Original file line number Diff line number Diff line change @@ -1043,6 +1043,7 @@ public void setImage (Image image) {
10431043 if (GTK .GTK4 ) return ;
10441044
10451045 checkWidget ();
1046+ if (this .image == image ) return ;
10461047 if ((style & SWT .SEPARATOR ) != 0 ) return ;
10471048 disposeDefaultDisabledImage ();
10481049 super .setImage (image );
Original file line number Diff line number Diff line change @@ -1106,6 +1106,7 @@ public void setControl (Control control) {
11061106 */
11071107public void setDisabledImage (Image image ) {
11081108 checkWidget ();
1109+ if (this .disabledImage == image ) return ;
11091110 if ((style & SWT .SEPARATOR ) != 0 ) return ;
11101111 disabledImage = image ;
11111112 if (image != null ) {
@@ -1223,6 +1224,7 @@ void setForegroundRGBA (long handle, GdkRGBA rgba) {
12231224 */
12241225public void setHotImage (Image image ) {
12251226 checkWidget ();
1227+ if (this .hotImage == image ) return ;
12261228 if ((style & SWT .SEPARATOR ) != 0 ) return ;
12271229 hotImage = image ;
12281230 if (image != null ) {
@@ -1240,6 +1242,7 @@ public void setHotImage (Image image) {
12401242@ Override
12411243public void setImage (Image image ) {
12421244 checkWidget ();
1245+ if (this .image == image ) return ;
12431246 if ((style & SWT .SEPARATOR ) != 0 ) return ;
12441247 super .setImage (image );
12451248 disposeDefault ();
Original file line number Diff line number Diff line change @@ -783,6 +783,7 @@ public void setID (int id) {
783783@ Override
784784public void setImage (Image image ) {
785785 checkWidget ();
786+ if (this .image == image ) return ;
786787 if ((style & SWT .SEPARATOR ) != 0 ) return ;
787788 super .setImage (image );
788789 MENUITEMINFO info = new MENUITEMINFO ();
Original file line number Diff line number Diff line change @@ -704,6 +704,7 @@ public void setEnabled (boolean enabled) {
704704 */
705705public void setDisabledImage (Image image ) {
706706 checkWidget ();
707+ if (this .disabledImage == image ) return ;
707708 if ((style & SWT .SEPARATOR ) != 0 ) return ;
708709 if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
709710 parent .layout (isImageSizeChanged (disabledImage , image ));
@@ -730,6 +731,7 @@ public void setDisabledImage (Image image) {
730731 */
731732public void setHotImage (Image image ) {
732733 checkWidget ();
734+ if (this .hotImage == image ) return ;
733735 if ((style & SWT .SEPARATOR ) != 0 ) return ;
734736 if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
735737 parent .layout (isImageSizeChanged (hotImage , image ));
@@ -740,6 +742,7 @@ public void setHotImage (Image image) {
740742@ Override
741743public void setImage (Image image ) {
742744 checkWidget ();
745+ if (this .image == image ) return ;
743746 if ((style & SWT .SEPARATOR ) != 0 ) return ;
744747 if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
745748 parent .layout (isImageSizeChanged (super .image , image ));
You can’t perform that action at this time.
0 commit comments