Skip to content

Commit 0e0d38c

Browse files
akoch-yattaHeikoKlare
authored andcommitted
[win32] Fix for Image disablement
This commit adjusts the order in the Image copy constructor. As the call to ImageProviderWrapper#createCopy creates cached variants for some implementation. These created variants could be missing disablement/greyed state. Therfor this flag is set before that.
1 parent 393309f commit 0e0d38c

File tree

1 file changed

+1
-1
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics

1 file changed

+1
-1
lines changed

bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ public Image(Device device, Image srcImage, int flag) {
232232
if (srcImage == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
233233
if (srcImage.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT);
234234
this.type = srcImage.type;
235-
this.imageProvider = srcImage.imageProvider.createCopy(this);
236235
this.styleFlag = srcImage.styleFlag | flag;
236+
this.imageProvider = srcImage.imageProvider.createCopy(this);
237237
switch (flag) {
238238
case SWT.IMAGE_COPY: {
239239
switch (type) {

0 commit comments

Comments
 (0)