[gimp/gimp-2-8] Bug 749777 - Deleting current gradient from script leads to...
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 749777 - Deleting current gradient from script leads to...
- Date: Sat, 30 May 2015 22:33:40 +0000 (UTC)
commit 5c1889c4e5ebf475538e762a7000c72e2a9d2dce
Author: Michael Natterer <mitch gimp org>
Date: Sun May 31 00:31:40 2015 +0200
Bug 749777 - Deleting current gradient from script leads to...
GIMP_IS_TAGGED error and possible Gimp crash (core segfault)
Remove the object from GimpTagEntry's selected_items when it is
removed from the GimpContainer.
(cherry picked from commit ae708d6419d6cd37c75547d86fcad35a09ce7a1f)
app/widgets/gimptagentry.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/app/widgets/gimptagentry.c b/app/widgets/gimptagentry.c
index 73227e1..9dc2e84 100644
--- a/app/widgets/gimptagentry.c
+++ b/app/widgets/gimptagentry.c
@@ -1209,20 +1209,27 @@ gimp_tag_entry_container_changed (GimpContainer *container,
GimpObject *object,
GimpTagEntry *tag_entry)
{
- if (tag_entry->mode == GIMP_TAG_ENTRY_MODE_ASSIGN)
+ GList *list;
+
+ if (! gimp_container_have (GIMP_CONTAINER (tag_entry->container),
+ object))
{
- GList *list;
+ GList *selected_items = NULL;
for (list = tag_entry->selected_items; list; list = g_list_next (list))
{
- if (gimp_tagged_get_tags (GIMP_TAGGED (list->data)) &&
- gimp_container_have (GIMP_CONTAINER (tag_entry->container),
- GIMP_OBJECT (list->data)))
- {
- break;
- }
+ if (list->data != object)
+ selected_items = g_list_prepend (selected_items, list->data);
}
+ selected_items = g_list_reverse (selected_items);
+ gimp_tag_entry_set_selected_items (tag_entry, selected_items);
+ g_list_free (selected_items);
+ }
+
+ if (tag_entry->mode == GIMP_TAG_ENTRY_MODE_ASSIGN)
+ {
+
if (! list)
{
tag_entry->internal_operation++;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]