[libgda] Bug fix in GdauiDataEntry implementation



commit 1aecc46091bd11837f3ecd970a85c0fab34ad17c
Author: Vivien Malerba <malerba gnome-db org>
Date:   Wed Jul 21 17:12:47 2010 +0200

    Bug fix in GdauiDataEntry implementation

 libgda-ui/data-entries/gdaui-entry-wrapper.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libgda-ui/data-entries/gdaui-entry-wrapper.c b/libgda-ui/data-entries/gdaui-entry-wrapper.c
index 7b5d4a6..ee7fa02 100644
--- a/libgda-ui/data-entries/gdaui-entry-wrapper.c
+++ b/libgda-ui/data-entries/gdaui-entry-wrapper.c
@@ -643,9 +643,10 @@ gdaui_entry_wrapper_set_attributes (GdauiDataEntry *iface, GdaValueAttribute att
 		mgwrap->priv->null_possible = (attrs & GDA_VALUE_ATTR_CAN_BE_NULL) ? TRUE : FALSE;
 
 	/* Setting to DEFAULT */
+	guint current = gdaui_data_entry_get_attributes (iface);
 	if (mask & GDA_VALUE_ATTR_IS_DEFAULT) {
-		if (! (mask & GDA_VALUE_ATTR_CAN_BE_DEFAULT))
-			g_return_if_reached ();
+		if (! (current & GDA_VALUE_ATTR_CAN_BE_DEFAULT))
+			g_warning ("Data entry does not have a default value");
 		if (attrs & GDA_VALUE_ATTR_IS_DEFAULT) {
 			block_signals (mgwrap);
 			if (mgwrap->priv->value_default) {



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