[glade/glade-3-8] * plugins/gtk+/glade-model-data.c: Avoid committing the data if the data did not change... commi



commit 735d8d7905cdaa063f8dfd87921bbfff23cdcaf6
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Jan 29 19:11:38 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.
    
    Conflicts:
    
    	ChangeLog
    	plugins/gtk+/glade-model-data.c

 ChangeLog                       |    6 ++++++
 plugins/gtk+/glade-model-data.c |    9 ++++++++-
 2 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6ab53f4..316dd92 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 0e08fca..2c69614 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]