summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.van.berkom@gmail.com>2011-01-29 19:11:38 +0900
committerTristan Van Berkom <tristan.van.berkom@gmail.com>2011-01-29 19:11:38 +0900
commit735d8d7905cdaa063f8dfd87921bbfff23cdcaf6 (patch)
tree03a1d529771d4c954a4c80c1e8090eb7f39dd7c5
parente8d3cac9dc20405ad601643e506399bf36d0fde1 (diff)
downloadglade-735d8d7905cdaa063f8dfd87921bbfff23cdcaf6.tar.gz
* 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
-rw-r--r--ChangeLog6
-rw-r--r--plugins/gtk+/glade-model-data.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ab53f4c..316dd920 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-01-29 Tristan Van Berkom <tristanvb@openismus.com>
+
+ * 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 <tristanvb@openismus.com>
* 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;