summaryrefslogtreecommitdiffstats
path: root/src/node.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-03 00:31:10 +0000
committerDavid Robillard <d@drobilla.net>2014-01-03 00:31:10 +0000
commita6aba9a3e541b8f193e93c653bac7bbae111de17 (patch)
treed8f243e3432556706878441f563f8872088085ec /src/node.c
parent023925ef7ecf8314e51f2bb14717f88b92240438 (diff)
downloadganv-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.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/node.c b/src/node.c
index 66dca01..f253e5b 100644
--- a/src/node.c
+++ b/src/node.c
@@ -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 {