summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/canvas-base.c12
-rw-r--r--src/node.c12
-rw-r--r--src/port.c1
3 files changed, 13 insertions, 12 deletions
diff --git a/src/canvas-base.c b/src/canvas-base.c
index 653ebf2..59ed3de 100644
--- a/src/canvas-base.c
+++ b/src/canvas-base.c
@@ -249,22 +249,22 @@ ganv_item_dispose(GObject* object)
/* Make the canvas forget about us */
- if (item->canvas && ( item == item->canvas->current_item) ) {
+ if (item->canvas && item == item->canvas->current_item) {
item->canvas->current_item = NULL;
item->canvas->need_repick = TRUE;
}
- if (item->canvas && ( item == item->canvas->new_current_item) ) {
+ if (item->canvas && item == item->canvas->new_current_item) {
item->canvas->new_current_item = NULL;
item->canvas->need_repick = TRUE;
}
- if (item->canvas && ( item == item->canvas->grabbed_item) ) {
+ if (item->canvas && item == item->canvas->grabbed_item) {
item->canvas->grabbed_item = NULL;
gdk_pointer_ungrab(GDK_CURRENT_TIME);
}
- if (item->canvas && ( item == item->canvas->focused_item) ) {
+ if (item->canvas && item == item->canvas->focused_item) {
item->canvas->focused_item = NULL;
}
@@ -750,9 +750,13 @@ ganv_item_get_bounds(GanvItem* item, double* x1, double* y1, double* x2, double*
void
ganv_item_request_update(GanvItem* item)
{
+ /* FIXME: For some reason, if this short-circuit is enabled, the canvas
+ stops updating items entirely when connected modules are removed. */
+ /*
if (item->object.flags & GANV_ITEM_NEED_UPDATE) {
return;
}
+ */
item->object.flags |= GANV_ITEM_NEED_UPDATE;
diff --git a/src/node.c b/src/node.c
index ff214ba..062e54f 100644
--- a/src/node.c
+++ b/src/node.c
@@ -95,14 +95,14 @@ ganv_node_destroy(GtkObject* object)
ganv_node_disconnect(node);
if (item->canvas) {
ganv_canvas_remove_node(GANV_CANVAS(item->canvas), node);
- item->canvas = NULL;
}
- impl->partner = NULL;
-
if (GTK_OBJECT_CLASS(parent_class)->destroy) {
(*GTK_OBJECT_CLASS(parent_class)->destroy)(object);
}
+
+ impl->partner = NULL;
+ item->canvas = NULL;
}
static void
@@ -425,14 +425,12 @@ ganv_node_default_event(GanvItem* item,
switch (event->type) {
case GDK_ENTER_NOTIFY:
ganv_item_raise(GANV_ITEM(node));
- ganv_item_set(GANV_ITEM(node),
- "highlighted", TRUE, NULL);
+ ganv_item_set(GANV_ITEM(node), "highlighted", TRUE, NULL);
return TRUE;
case GDK_LEAVE_NOTIFY:
ganv_item_lower(GANV_ITEM(node));
- ganv_item_set(GANV_ITEM(node),
- "highlighted", FALSE, NULL);
+ ganv_item_set(GANV_ITEM(node), "highlighted", FALSE, NULL);
return TRUE;
case GDK_BUTTON_PRESS:
diff --git a/src/port.c b/src/port.c
index 3b9ba69..6603530 100644
--- a/src/port.c
+++ b/src/port.c
@@ -70,7 +70,6 @@ ganv_port_destroy(GtkObject* object)
ganv_canvas_for_each_edge_from(
canvas, &port->box.node, (GanvEdgeFunc)ganv_edge_remove, NULL);
}
- item->canvas = NULL;
}
if (GTK_OBJECT_CLASS(parent_class)->destroy) {