From 403af1880f44fad9982cd1a10743fc8ded30afff Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Thu, 18 Apr 2024 04:02:48 +0000 Subject: [PATCH] plug-ins: Fix GeglColor port of palette-offset Removes an index that was needed to GimpRGB, but no longer valid now that gimp_palette_entry_get_color () returns a GeglColor object. Also, fixed an issue in Interactive Mode where the first valid palette would be used for every other attempt, no matter which palette you clicked on. --- plug-ins/python/palette-offset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plug-ins/python/palette-offset.py b/plug-ins/python/palette-offset.py index a94fc0903e..fbe10630ce 100644 --- a/plug-ins/python/palette-offset.py +++ b/plug-ins/python/palette-offset.py @@ -155,7 +155,7 @@ class PaletteOffset (Gimp.PlugIn): return procedure.new_return_values(Gimp.PDBStatusType.CANCEL, GLib.Error("Canceled")) amount = self.get_property("amount") - config.set_property("amount", amount) + config.set_property("palette", None) #If palette is read only, work on a copy: editable = palette.is_editable() @@ -166,7 +166,7 @@ class PaletteOffset (Gimp.PlugIn): tmp_entry_array = [] for i in range (num_colors): tmp_entry_array.append ((palette.entry_get_name(i)[1], - palette.entry_get_color(i)[1])) + palette.entry_get_color(i))) for i in range (num_colors): target_index = i + amount if target_index >= num_colors: