GNOME Bugzilla – Bug 514082
Creating a new image doesn't take into account the background/foreground color
Last modified: 2008-10-30 20:09:07 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:
Indeed, it takes the background color from the time when the dialog is created. That's probably not what the user expects.
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).
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.
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.
Created attachment 104469 [details] [review] simpler patch What's wrong with the simple approach?
Committed to both branches. Closing as FIXED.