plug-ins: Don't show invalid icons twice on export

This adds a check to make sure icon is valid when displaying
the icons in order, to prevent duplicates showing there and in the
invalid list at the bottom
This commit is contained in:
Alx Sa 2022-11-16 18:59:29 +00:00
parent 6865c6f620
commit 01afc271ce
1 changed files with 3 additions and 1 deletions

View File

@ -367,8 +367,10 @@ icns_save_dialog (IcnsSaveInfo *info,
iter = g_list_next (iter), j++) iter = g_list_next (iter), j++)
{ {
/* Put the icons in order in dialog */ /* Put the icons in order in dialog */
gint width = gimp_drawable_get_width (iter->data);
gint height = gimp_drawable_get_height (iter->data); gint height = gimp_drawable_get_height (iter->data);
if (height != ordered[i])
if (height != ordered[i] || ! icns_check_dimensions (width, height))
continue; continue;
icns_dialog_add_icon (dialog, iter->data, i, duplicates); icns_dialog_add_icon (dialog, iter->data, i, duplicates);