[gimp/gimp-2-10] app: don't depend on GimpData sort order for identifying internal data
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: don't depend on GimpData sort order for identifying internal data
- Date: Mon, 1 Oct 2018 09:25:24 +0000 (UTC)
commit 937f5ea0f083745270155e73e2d3b65621a13d34
Author: Ell <ell_se yahoo com>
Date: Mon Oct 1 02:25:22 2018 -0400
app: don't depend on GimpData sort order for identifying internal data
In gimp_data_factory_data_foreach(), don't rely on internal
GimpData objects being sorted first (while this is currently true
for all types of GimpData, they may override the sort order.)
(cherry picked from commit 50bab438ce58bf372089664d99026a3ca6866c43)
app/core/gimpdatafactory.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/app/core/gimpdatafactory.c b/app/core/gimpdatafactory.c
index 844496c5ae..1fb1c7b30a 100644
--- a/app/core/gimpdatafactory.c
+++ b/app/core/gimpdatafactory.c
@@ -747,17 +747,12 @@ gimp_data_factory_data_foreach (GimpDataFactory *factory,
list = GIMP_LIST (factory->priv->container)->queue->head;
- if (skip_internal)
- {
- while (list && gimp_data_is_internal (GIMP_DATA (list->data)))
- list = g_list_next (list);
- }
-
while (list)
{
GList *next = g_list_next (list);
- callback (factory, list->data, user_data);
+ if (! (skip_internal && gimp_data_is_internal (list->data)))
+ callback (factory, list->data, user_data);
list = next;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]