diff options
author | David Robillard <d@drobilla.net> | 2014-01-03 00:31:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-03 00:31:10 +0000 |
commit | a6aba9a3e541b8f193e93c653bac7bbae111de17 (patch) | |
tree | d8f243e3432556706878441f563f8872088085ec /src/node.c | |
parent | 023925ef7ecf8314e51f2bb14717f88b92240438 (diff) | |
download | ganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.tar.gz ganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.tar.bz2 ganv-a6aba9a3e541b8f193e93c653bac7bbae111de17.zip |
Don't abuse show_label property for vertical/horizontal mode.
Don't use g_object_get to get x and y coordinates of items.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5246 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/node.c')
-rw-r--r-- | src/node.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -232,10 +232,8 @@ ganv_node_default_tail_vector(const GanvNode* self, { GanvCanvas* canvas = GANV_CANVAS(GANV_ITEM(self)->canvas); - g_object_get(G_OBJECT(self), - "x", x, - "y", y, - NULL); + *x = GANV_ITEM(self)->x; + *y = GANV_ITEM(self)->y; switch (canvas->direction) { case GANV_DIRECTION_RIGHT: @@ -261,10 +259,8 @@ ganv_node_default_head_vector(const GanvNode* self, { GanvCanvas* canvas = GANV_CANVAS(GANV_ITEM(self)->canvas); - g_object_get(G_OBJECT(self), - "x", x, - "y", y, - NULL); + *x = GANV_ITEM(self)->x; + *y = GANV_ITEM(self)->y; switch (canvas->direction) { case GANV_DIRECTION_RIGHT: @@ -467,8 +463,8 @@ ganv_node_default_event(GanvItem* item, if (selected) { ganv_canvas_selection_move_finished(canvas); } else { - double x, y; - g_object_get(node, "x", &x, "y", &y, NULL); + const double x = GANV_ITEM(node)->x; + const double y = GANV_ITEM(node)->y; g_signal_emit(node, signal_moved, 0, x, y, NULL); } } else { |