app: always emit GimpImage::profile-changed when converting from/to GRAY

so the display profile transform is properly updated.
This commit is contained in:
Michael Natterer 2015-12-25 23:31:15 +01:00
parent b3dbb968c9
commit 32725df29d
1 changed files with 10 additions and 2 deletions

View File

@ -1101,11 +1101,19 @@ gimp_image_convert_type (GimpImage *image,
case GIMP_RGB:
case GIMP_INDEXED:
if (old_type == GIMP_GRAY)
gimp_image_set_color_profile (image, NULL, NULL);
{
if (gimp_image_get_color_profile (image))
gimp_image_set_color_profile (image, NULL, NULL);
else
gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
}
break;
case GIMP_GRAY:
gimp_image_set_color_profile (image, NULL, NULL);
if (gimp_image_get_color_profile (image))
gimp_image_set_color_profile (image, NULL, NULL);
else
gimp_color_managed_profile_changed (GIMP_COLOR_MANAGED (image));
break;
}