From 19050ce7c0a7481427888d2998351127f5d0312c Mon Sep 17 00:00:00 2001 From: Alx Sa Date: Thu, 23 Feb 2023 04:39:29 +0000 Subject: [PATCH] dialog: Use column value from imported palettes GIMP's .gpl palette format and Swatchbooker's .sbz format can contain metadata on the number of columns. This value was ignored before; now the import dialogue checks for this value and uses it. --- app/dialogs/palette-import-dialog.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/dialogs/palette-import-dialog.c b/app/dialogs/palette-import-dialog.c index b3a054e98d..a726f7de85 100644 --- a/app/dialogs/palette-import-dialog.c +++ b/app/dialogs/palette-import-dialog.c @@ -847,6 +847,18 @@ palette_import_make_palette (ImportDialog *private) error->message); g_error_free (error); } + else + { + gint columns = gimp_palette_get_columns (palette); + + if (columns > 0) + { + n_columns = columns; + + gimp_label_spin_set_value (GIMP_LABEL_SPIN (private->columns), + n_columns); + } + } } break; }