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) {
704
704
@ Override
705
705
public void setImage (Image image ) {
706
706
checkWidget ();
707
+ if (this .image == image ) return ;
707
708
if ((style & SWT .SEPARATOR ) != 0 ) return ;
708
709
super .setImage (image );
709
710
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) {
1058
1058
*/
1059
1059
public void setDisabledImage (Image image ) {
1060
1060
checkWidget ();
1061
+ if (this .disabledImage == image ) return ;
1061
1062
if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
1062
1063
if ((style & SWT .SEPARATOR ) != 0 ) return ;
1063
1064
disabledImage = image ;
@@ -1093,6 +1094,7 @@ boolean setFocus () {
1093
1094
*/
1094
1095
public void setHotImage (Image image ) {
1095
1096
checkWidget ();
1097
+ if (this .hotImage == image ) return ;
1096
1098
if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
1097
1099
if ((style & SWT .SEPARATOR ) != 0 ) return ;
1098
1100
hotImage = image ;
@@ -1102,6 +1104,7 @@ public void setHotImage (Image image) {
1102
1104
@ Override
1103
1105
public void setImage (Image image ) {
1104
1106
checkWidget ();
1107
+ if (this .image == image ) return ;
1105
1108
if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
1106
1109
if ((style & SWT .SEPARATOR ) != 0 ) return ;
1107
1110
super .setImage (image );
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ void releaseWidget () {
176
176
*/
177
177
public void setImage (Image image ) {
178
178
checkWidget ();
179
+ if (this .image == image ) return ;
179
180
if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
180
181
this .image = image ;
181
182
}
Original file line number Diff line number Diff line change @@ -1043,6 +1043,7 @@ public void setImage (Image image) {
1043
1043
if (GTK .GTK4 ) return ;
1044
1044
1045
1045
checkWidget ();
1046
+ if (this .image == image ) return ;
1046
1047
if ((style & SWT .SEPARATOR ) != 0 ) return ;
1047
1048
disposeDefaultDisabledImage ();
1048
1049
super .setImage (image );
Original file line number Diff line number Diff line change @@ -1106,6 +1106,7 @@ public void setControl (Control control) {
1106
1106
*/
1107
1107
public void setDisabledImage (Image image ) {
1108
1108
checkWidget ();
1109
+ if (this .disabledImage == image ) return ;
1109
1110
if ((style & SWT .SEPARATOR ) != 0 ) return ;
1110
1111
disabledImage = image ;
1111
1112
if (image != null ) {
@@ -1223,6 +1224,7 @@ void setForegroundRGBA (long handle, GdkRGBA rgba) {
1223
1224
*/
1224
1225
public void setHotImage (Image image ) {
1225
1226
checkWidget ();
1227
+ if (this .hotImage == image ) return ;
1226
1228
if ((style & SWT .SEPARATOR ) != 0 ) return ;
1227
1229
hotImage = image ;
1228
1230
if (image != null ) {
@@ -1240,6 +1242,7 @@ public void setHotImage (Image image) {
1240
1242
@ Override
1241
1243
public void setImage (Image image ) {
1242
1244
checkWidget ();
1245
+ if (this .image == image ) return ;
1243
1246
if ((style & SWT .SEPARATOR ) != 0 ) return ;
1244
1247
super .setImage (image );
1245
1248
disposeDefault ();
Original file line number Diff line number Diff line change @@ -783,6 +783,7 @@ public void setID (int id) {
783
783
@ Override
784
784
public void setImage (Image image ) {
785
785
checkWidget ();
786
+ if (this .image == image ) return ;
786
787
if ((style & SWT .SEPARATOR ) != 0 ) return ;
787
788
super .setImage (image );
788
789
MENUITEMINFO info = new MENUITEMINFO ();
Original file line number Diff line number Diff line change @@ -704,6 +704,7 @@ public void setEnabled (boolean enabled) {
704
704
*/
705
705
public void setDisabledImage (Image image ) {
706
706
checkWidget ();
707
+ if (this .disabledImage == image ) return ;
707
708
if ((style & SWT .SEPARATOR ) != 0 ) return ;
708
709
if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
709
710
parent .layout (isImageSizeChanged (disabledImage , image ));
@@ -730,6 +731,7 @@ public void setDisabledImage (Image image) {
730
731
*/
731
732
public void setHotImage (Image image ) {
732
733
checkWidget ();
734
+ if (this .hotImage == image ) return ;
733
735
if ((style & SWT .SEPARATOR ) != 0 ) return ;
734
736
if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
735
737
parent .layout (isImageSizeChanged (hotImage , image ));
@@ -740,6 +742,7 @@ public void setHotImage (Image image) {
740
742
@ Override
741
743
public void setImage (Image image ) {
742
744
checkWidget ();
745
+ if (this .image == image ) return ;
743
746
if ((style & SWT .SEPARATOR ) != 0 ) return ;
744
747
if (image != null && image .isDisposed ()) error (SWT .ERROR_INVALID_ARGUMENT );
745
748
parent .layout (isImageSizeChanged (super .image , image ));
You can’t perform that action at this time.
0 commit comments