GNOME Bugzilla – Bug 593848
FG color changed to black when FG-BG Editor tab created
Last modified: 2009-11-08 13:31:57 UTC
When the FG-BG Color Editor dock is first created -- either by "Windows->Dockable Dialog->Colors" or by using Add Tab in an existing dock -- the current foreground color gets set to black. This can easily be tested by closing any open FG-BG Color Editor docks, setting the foreground color to red, then opening a FG-BG Color Editor dock. The expectation would be that the FG color remains red, but instead it is changed to black. I think that the cause of this anomalous behavior may be attributed to the function 'gimp_fg_bg_editor_get_property()' in app/widgets/gimpfgbgeditor.c -- which actually *sets* the properties rather than 'gets' them. (Bug #558327 may possibly be related to this.)
The code in gimp_fg_bg_editor_get_property() looks correct. It sets the GValue to the requested property value. That is what a get_property() function is supposed to do.
I always wondered what sets the FG color to black :) Thanks for finding a way to reproduce it. I tracked down the problem to modules/color-selector-cmyk-lcms.c which changes the color when setting a profile. It's fixed locally but I first want to be sure that I didn't break the module before committing.
Fixed in both branches: commit b8c28ab2b4b96c57f25bba0489de7655f685a012 Author: Michael Natterer <mitch@gimp.org> Date: Sun Nov 8 14:22:26 2009 +0100 Bug 593848 - FG color changed to black when FG-BG Editor tab created When a color gets set on the module via GimpColorSelector::set_color(), make sure that the result of its transformation to CMYK doesn't get set back on GIMP. Also, when the color profile changes, make sure we only re-transform the RGB value to CMYK and don't set that result back on GIMP either. (cherry picked from commit 659cf3743e3c48e18a08ba41c83c7ef77c841410) modules/color-selector-cmyk-lcms.c | 25 ++++++++++++++++++++----- 1 files changed, 20 insertions(+), 5 deletions(-)
Really resolving as FIXED...
*** Bug 558327 has been marked as a duplicate of this bug. ***