From 7f09826d2364ec366fdb4b7e3f4d04af8d5fb07e Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Sat, 23 Nov 2024 16:26:32 +0000 Subject: [PATCH] plug-ins: Fix fractal explorer crash related to color-mode In activate_fractal (), we copy over preset Fractal values into the current config object. Since "color-mode" is now a GimpChoice instead of an int, this caused a crash when applied. This patch switches it to set a string in g_object_set () rather than the original int. --- plug-ins/fractal-explorer/fractal-explorer.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plug-ins/fractal-explorer/fractal-explorer.c b/plug-ins/fractal-explorer/fractal-explorer.c index 9f5c962dbf..03ee2c2fdb 100644 --- a/plug-ins/fractal-explorer/fractal-explorer.c +++ b/plug-ins/fractal-explorer/fractal-explorer.c @@ -971,12 +971,24 @@ activate_fractal (fractalexplorerOBJ *sel_obj) "red-stretch", current_obj->opts.redstretch, "green-stretch", current_obj->opts.greenstretch, "blue-stretch", current_obj->opts.bluestretch, - "color-mode", current_obj->opts.colormode, "red-invert", current_obj->opts.redinvert, "green-invert", current_obj->opts.greeninvert, "blue-invert", current_obj->opts.blueinvert, NULL); + switch (current_obj->opts.colormode) + { + case 0: + g_object_set (wvals.config, "color-mode", "colormap", NULL); + break; + + case 1: + g_object_set (wvals.config, "color-mode", "gradient", NULL); + break; + + default: + break; + } switch (current_obj->opts.fractaltype) { case 0: