[libgda/LIBGDA_5.2] Correction for bug #742312
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_5.2] Correction for bug #742312
- Date: Sun, 11 Jan 2015 20:53:04 +0000 (UTC)
commit 4abab9136ec4848144fa7673d4503670e0223f93
Author: Vivien Malerba <malerba gnome-db org>
Date: Sun Jan 11 21:52:20 2015 +0100
Correction for bug #742312
tools/browser/canvas/browser-canvas.c | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/tools/browser/canvas/browser-canvas.c b/tools/browser/canvas/browser-canvas.c
index e173c1b..82e8509 100644
--- a/tools/browser/canvas/browser-canvas.c
+++ b/tools/browser/canvas/browser-canvas.c
@@ -896,29 +896,32 @@ browser_canvas_perform_auto_layout (BrowserCanvas *canvas, gboolean animate, Bro
tmp = g_strdup_printf ("%p", item);
#ifdef GRAPHVIZ_NEW_API
- node = agnode (graph, tmp, 0);
+ node = agnode (graph, tmp, 1);
#else
node = agnode (graph, tmp);
#endif
nl->node = node;
g_hash_table_insert (nodes_hash, item, node);
-
- tmp = g_strdup_printf ("%p", node);
- agset (node, "label", tmp);
- g_free (tmp);
-
goo_canvas_item_get_bounds (GOO_CANVAS_ITEM (item), &bounds);
nl->width = bounds.x2 - bounds.x1;
nl->height = bounds.y2 - bounds.y1;
val = (bounds.y2 - bounds.y1) / GV_SCALE;
- tmp = g_strdup_printf ("%.3f", val);
- agset (node, "height", tmp);
- g_free (tmp);
- val = (bounds.x2 - bounds.x1) / GV_SCALE;
- tmp = g_strdup_printf ("%.3f", val);
- agset (node, "width", tmp);
- g_free (tmp);
-
+
+ if (node) {
+ tmp = g_strdup_printf ("%p", node);
+ agset (node, "label", tmp);
+ g_free (tmp);
+
+ tmp = g_strdup_printf ("%.3f", val);
+ agset (node, "height", tmp);
+ g_free (tmp);
+
+ val = (bounds.x2 - bounds.x1) / GV_SCALE;
+ tmp = g_strdup_printf ("%.3f", val);
+ agset (node, "width", tmp);
+ g_free (tmp);
+ }
+
nl->start_x = bounds.x1;
nl->start_y = bounds.y1;
nl->cur_x = nl->start_x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]