• Jehan's avatar
    Issue #5313: consistent "file-pat-save-internal" procedure with… · 6905b0bb
    Jehan authored
    … multiple drawables as parameter.
    Previous commit 7bb892f3 was "making it work" by making the API
    inconsistent and also only using the first drawable, which is making the
    logics meaningless.
    Instead accept multiple drawables, and export only the selected drawable
    (when alone) or the merged-down image containing only the selected
    drawables (when many).
    Note that in current implementation, this is not useful from GUI calls
    because the fully merged image is always exported when run interactively
    or with last vals (i.e. from the GUI) because gimp_export_image()
    flattens the image. So this change would only work when called
    non-interactively from other plug-ins. In such a case, multi-layer
    images do no longer return an error and whatever items are selected
    would change the export result.
    See also #7370 for a discussion about how to handle the selected items
    during export (because currently the `drawables` parameter of
    GimpSaveProcedure's run function is clearly a mostly bogus parameter).