libgimp: the default run (if no run-mode parameter) should be non-interactive.

Otherwise we will always try to reuse previous values or use the default,
bypassing the actual passed values.

I encountered this issue while porting file-glob and realizing that the
"pattern" argument was always passed to NULL, ignoring the explicitly set
pattern.

When a procedure has no run-mode argument, we should simply not assume anything
and use the passed arguments (which is what the non-interactive mode does).
This commit is contained in:
Jehan 2023-06-15 16:13:37 +02:00
parent 9b2240f51e
commit c09711beaa
1 changed files with 1 additions and 1 deletions

View File

@ -485,7 +485,7 @@ gimp_procedure_real_run (GimpProcedure *procedure,
{
GimpProcedureConfig *config;
GimpImage *image = NULL;
GimpRunMode run_mode = GIMP_RUN_INTERACTIVE;
GimpRunMode run_mode = GIMP_RUN_NONINTERACTIVE;
GimpValueArray *retvals;
GimpPDBStatusType status = GIMP_PDB_EXECUTION_ERROR;