script-fu: Fix background color in Round Corners
When we call (gimp-context-set-defaults) in the Round Corners script, we reset the background color in addition to temporarily clearing out the other context settings. This results in us always using the default white background color for the "Add background" toggle. This patch saves the background color beforehand and restores it before creating the background layer, so we still use the user's preferred color for this layer.
This commit is contained in:
parent
885c07555d
commit
ec1dfb2e0c
1 changed files with 2 additions and 0 deletions
|
|
@ -59,10 +59,12 @@
|
|||
; active drawable is not necessarily the active layer
|
||||
(pic-layer (vector-ref (car (gimp-image-get-selected-layers image)) 0))
|
||||
(type (car (gimp-drawable-type-with-alpha pic-layer)))
|
||||
(background-color (car (gimp-context-get-background)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
(gimp-context-set-defaults)
|
||||
(gimp-context-set-background background-color)
|
||||
|
||||
(if (= work-on-copy TRUE)
|
||||
(gimp-image-undo-disable image)
|
||||
|
|
|
|||
Loading…
Reference in a new issue