Updated with upstream update
This commit is contained in:
@ -212,7 +212,7 @@ static PikaValueArray * ifs_run (PikaProcedure *procedure,
|
||||
PikaImage *image,
|
||||
gint n_drawables,
|
||||
PikaDrawable **drawables,
|
||||
const PikaValueArray *args,
|
||||
PikaProcedureConfig *config,
|
||||
gpointer run_data);
|
||||
|
||||
/* user interface functions */
|
||||
@ -454,6 +454,11 @@ ifs_create_procedure (PikaPlugIn *plug_in,
|
||||
"Owen Taylor",
|
||||
"Owen Taylor",
|
||||
"1997");
|
||||
|
||||
PIKA_PROC_AUX_ARG_STRING (procedure, "fractal-str",
|
||||
"The fractal description serialized as string",
|
||||
NULL, NULL,
|
||||
PIKA_PARAM_READWRITE);
|
||||
}
|
||||
|
||||
return procedure;
|
||||
@ -465,7 +470,7 @@ ifs_run (PikaProcedure *procedure,
|
||||
PikaImage *image,
|
||||
gint n_drawables,
|
||||
PikaDrawable **drawables,
|
||||
const PikaValueArray *args,
|
||||
PikaProcedureConfig *config,
|
||||
gpointer run_data)
|
||||
{
|
||||
PikaDrawable *drawable;
|
||||
@ -522,16 +527,12 @@ ifs_run (PikaProcedure *procedure,
|
||||
|
||||
if (! found_parasite)
|
||||
{
|
||||
gint length = pika_get_data_size (PLUG_IN_PROC);
|
||||
gchar *data = NULL;
|
||||
|
||||
if (length > 0)
|
||||
{
|
||||
gchar *data = g_new (gchar, length);
|
||||
|
||||
pika_get_data (PLUG_IN_PROC, data);
|
||||
ifsvals_parse_string (data, &ifsvals, &elements);
|
||||
g_free (data);
|
||||
}
|
||||
g_object_get (config, "fractal-str", &data, NULL);
|
||||
if (data != NULL && strlen (data) > 0)
|
||||
ifsvals_parse_string (data, &ifsvals, &elements);
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
/* after ifsvals_parse_string, need to set up naming */
|
||||
@ -557,22 +558,28 @@ ifs_run (PikaProcedure *procedure,
|
||||
break;
|
||||
|
||||
case PIKA_RUN_WITH_LAST_VALS:
|
||||
{
|
||||
gint length = pika_get_data_size (PLUG_IN_PROC);
|
||||
{
|
||||
gchar *data = NULL;
|
||||
|
||||
if (length > 0)
|
||||
{
|
||||
gchar *data = g_new (gchar, length);
|
||||
g_object_get (config, "fractal-str", &data, NULL);
|
||||
if (data != NULL && strlen (data) > 0)
|
||||
{
|
||||
ifsvals_parse_string (data, &ifsvals, &elements);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME: there is a known crash in this code path, because some
|
||||
* base structures (which are visibly created as part of the
|
||||
* dialog or with ifsvals_parse_string() on a valid serialized
|
||||
* fractal) don't exist. This should be fixed so that we can run
|
||||
* with last vals even when no last vals exist (which should use
|
||||
* defaults).
|
||||
*/
|
||||
ifs_compose_set_defaults ();
|
||||
}
|
||||
|
||||
pika_get_data (PLUG_IN_PROC, data);
|
||||
ifsvals_parse_string (data, &ifsvals, &elements);
|
||||
g_free (data);
|
||||
}
|
||||
else
|
||||
{
|
||||
ifs_compose_set_defaults ();
|
||||
}
|
||||
}
|
||||
g_free (data);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -593,8 +600,7 @@ ifs_run (PikaProcedure *procedure,
|
||||
* as a parasite on this layer
|
||||
*/
|
||||
str = ifsvals_stringify (&ifsvals, elements);
|
||||
|
||||
pika_set_data (PLUG_IN_PROC, str, strlen (str) + 1);
|
||||
g_object_set (config, "fractal-str", str, NULL);
|
||||
|
||||
parasite = pika_parasite_new (PLUG_IN_PARASITE,
|
||||
PIKA_PARASITE_PERSISTENT |
|
||||
|
Reference in New Issue
Block a user