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.
This commit is contained in:
Alx Sa 2023-02-23 04:39:29 +00:00
parent 6597dabeb3
commit 19050ce7c0
1 changed files with 12 additions and 0 deletions

View File

@ -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;
}