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 514082 - Creating a new image doesn't take into account the background/foreground color
Creating a new image doesn't take into account the background/foreground color
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.4.x
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-02-03 14:59 UTC by marco.dinacci
Modified: 2008-10-30 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Does not create a new context at New Image dialog creation (838 bytes, patch)
2008-02-04 16:31 UTC, Eric Lamarque
rejected Details | Review
Update BG/FG color in new image context at creation time (595 bytes, patch)
2008-02-05 10:20 UTC, Eric Lamarque
none Details | Review
simpler patch (763 bytes, patch)
2008-02-05 10:30 UTC, Sven Neumann
committed Details | Review

Description marco.dinacci 2008-02-03 14:59:41 UTC
Please describe the problem:
If a user changes the foreground or background color while the New Image dialog is open, after clicking OK Gimp a new image is created with the previous foreground or background.

Steps to reproduce:
1. Click on File->New
2. Choose a new background color from the palette
3. Click OK


Actual results:
A new image is created with the wrong color

Expected results:
A new image should be created with the color I chose

Does this happen every time?
yes

Other information:
Comment 1 Sven Neumann 2008-02-04 15:09:14 UTC
Indeed, it takes the background color from the time when the dialog is created. That's probably not what the user expects.
Comment 2 Eric Lamarque 2008-02-04 16:31:14 UTC
Created attachment 104400 [details] [review]
Does not create a new context at New Image dialog creation

I'm not very sure if the patch is correct, but it seems to work (against 2.4.4).
Comment 3 Michael Natterer 2008-02-04 18:39:25 UTC
That patch would change the selected template in the global template
list when you select a template from the dialog's menu.

The purpose of the local context is only to serve as a model
for the local template menu. It is a bug to use it for image
creation. The context passed to image_new_dialog_new() must
be used instead.
Comment 4 Eric Lamarque 2008-02-05 10:20:01 UTC
Created attachment 104468 [details] [review]
Update BG/FG color in new image context at creation time

Copy properties from gimp->user_context (what is in color editor dialog) to new image context.
Previous patch also triggers segmentation fault when selecting templates.
Comment 5 Sven Neumann 2008-02-05 10:30:19 UTC
Created attachment 104469 [details] [review]
simpler patch

What's wrong with the simple approach?
Comment 6 Sven Neumann 2008-02-05 10:34:17 UTC
Committed to both branches. Closing as FIXED.