plug-ins: fix #8441 distress-selection.scm script failure

distress-selection.scm uses gimp-image-set-active-channel which has been
removed causing script failure when a channel is selected instead of a
layer.

Use the new multi-layer aware gimp-image-set-selected-channels and also
use the gimp-item-id-is-* functions instead of the deprecated
gimp-item-is-* functions.
This commit is contained in:
Jacob Boerema 2023-05-25 18:31:47 -04:00
parent 2e219bccf2
commit 671996e897
1 changed files with 3 additions and 3 deletions

View File

@ -87,9 +87,9 @@
(plug-in-gauss-iir RUN-NONINTERACTIVE theImage theLayer 1 TRUE TRUE) (plug-in-gauss-iir RUN-NONINTERACTIVE theImage theLayer 1 TRUE TRUE)
(gimp-image-select-item inImage CHANNEL-OP-REPLACE theLayer) (gimp-image-select-item inImage CHANNEL-OP-REPLACE theLayer)
(gimp-image-remove-layer theImage theLayer) (gimp-image-remove-layer theImage theLayer)
(if (and (= (car (gimp-item-is-channel inDrawable)) TRUE) (if (and (= (car (gimp-item-id-is-channel inDrawable)) TRUE)
(= (car (gimp-item-is-layer-mask inDrawable)) FALSE)) (= (car (gimp-item-id-is-layer-mask inDrawable)) FALSE))
(gimp-image-set-active-channel theImage inDrawable) (gimp-image-set-selected-channels theImage 1 (make-vector 1 inDrawable))
) )
(gimp-image-undo-group-end theImage) (gimp-image-undo-group-end theImage)