[glade] * plugins/gtk+/glade-model-data.c: Avoid committing the data if the data did not change... commi
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] * plugins/gtk+/glade-model-data.c: Avoid committing the data if the data did not change... commi
- Date: Sat, 29 Jan 2011 09:59:36 +0000 (UTC)
commit 1bb44a3cc8d20f13d7cbbdf45420b5604c133474
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sat Jan 29 19:07:20 2011 +0900
* 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.
ChangeLog | 6 ++++++
plugins/gtk+/glade-model-data.c | 10 +++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 17b88ed..31deb33 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-28 Tristan Van Berkom <tristanvb openismus com>
* gladeui/glade-xml-utils.h, gladeui/glade-widget-adaptor.[ch], gladeui/glade-widget.[ch]:
diff --git a/plugins/gtk+/glade-model-data.c b/plugins/gtk+/glade-model-data.c
index 477d427..496b263 100644
--- a/plugins/gtk+/glade-model-data.c
+++ b/plugins/gtk+/glade-model-data.c
@@ -310,11 +310,19 @@ static gboolean
update_data_tree_idle (GladeEditorProperty * eprop)
{
GladeEPropModelData *eprop_data = GLADE_EPROP_MODEL_DATA (eprop);
+ GladeProperty *property = glade_editor_property_get_property (eprop);
GValue value = { 0, };
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 (property, &value))
+ glade_editor_property_commit (eprop, &value);
+
g_value_unset (&value);
eprop_data->pending_data_tree = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]