After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 593848 - FG color changed to black when FG-BG Editor tab created
FG color changed to black when FG-BG Editor tab created
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.6.7
Other Linux
: Normal minor
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
: 558327 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-09-01 20:43 UTC by saulgoode
Modified: 2009-11-08 13:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description saulgoode 2009-09-01 20:43:26 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.)
Comment 1 Sven Neumann 2009-09-01 21:25:44 UTC
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.
Comment 2 Michael Natterer 2009-09-01 21:30:54 UTC
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.
Comment 3 Michael Natterer 2009-11-08 13:29:31 UTC
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(-)
Comment 4 Michael Natterer 2009-11-08 13:29:53 UTC
Really resolving as FIXED...
Comment 5 Michael Natterer 2009-11-08 13:31:57 UTC
*** Bug 558327 has been marked as a duplicate of this bug. ***