From 735d8d7905cdaa063f8dfd87921bbfff23cdcaf6 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sat, 29 Jan 2011 19:11:38 +0900 Subject: * plugins/gtk+/glade-model-data.c: Avoid committing the data if the data did not change... committing the data when there is no change can cause the editor to load itself, this editor does not deal with that well. Fixes crasher bug 622839. Conflicts: ChangeLog plugins/gtk+/glade-model-data.c --- ChangeLog | 6 ++++++ plugins/gtk+/glade-model-data.c | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6ab53f4c..316dd920 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-01-29 Tristan Van Berkom + + * plugins/gtk+/glade-model-data.c: Avoid committing the data if the data did not + change... committing the data when there is no change can cause the editor to + load itself, this editor does not deal with that well. Fixes crasher bug 622839. + 2011-01-24 Tristan Van Berkom * 41 files: Fixed typo in LGPL License file headers. diff --git a/plugins/gtk+/glade-model-data.c b/plugins/gtk+/glade-model-data.c index 0e08fca8..2c696144 100644 --- a/plugins/gtk+/glade-model-data.c +++ b/plugins/gtk+/glade-model-data.c @@ -328,7 +328,14 @@ update_data_tree_idle (GladeEditorProperty *eprop) g_value_init (&value, GLADE_TYPE_MODEL_DATA_TREE); g_value_take_boxed (&value, eprop_data->pending_data_tree); - glade_editor_property_commit (eprop, &value); + + /* Only commit the value if it changed, otherwise this + * can trigger a load.. which we dont handle well in this + * editor + */ + if (!glade_property_equals_value (eprop->property, &value)) + glade_editor_property_commit (eprop, &value); + g_value_unset (&value); eprop_data->pending_data_tree = NULL; -- cgit v1.2.1