diff options
-rw-r--r-- | src/Canvas.cpp | 1 | ||||
-rw-r--r-- | src/edge.c | 10 | ||||
-rw-r--r-- | src/ganv-private.h | 6 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 0fa494e..17a28cf 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -648,6 +648,7 @@ GanvCanvasImpl::remove_edge(GanvEdge* edge) _selected_edges.erase(edge); _edges.erase(edge); _dst_edges.erase(edge); + ganv_edge_request_redraw(GANV_ITEM(edge)->canvas, &edge->impl->coords); gtk_object_destroy(GTK_OBJECT(edge)); } } @@ -163,9 +163,9 @@ ganv_edge_get_property(GObject* object, } } -static void -request_redraw(GanvCanvasBase* canvas, - const GanvEdgeCoords* coords) +void +ganv_edge_request_redraw(GanvCanvasBase* canvas, + const GanvEdgeCoords* coords) { const double w = coords->width; if (coords->curved) { @@ -259,7 +259,7 @@ ganv_edge_update(GanvItem* item, int flags) } // Request redraw of old location - request_redraw(item->canvas, &impl->old_coords); + ganv_edge_request_redraw(item->canvas, &impl->old_coords); // Calculate new coordinates from tail and head GanvEdgeCoords* coords = &impl->coords; @@ -300,7 +300,7 @@ ganv_edge_update(GanvItem* item, int flags) ganv_canvas_base_w2c_d(GANV_CANVAS_BASE(item->canvas), x2, y2, &item->x2, &item->y2); // Request redraw of new location - request_redraw(item->canvas, &impl->coords); + ganv_edge_request_redraw(item->canvas, &impl->coords); } static void diff --git a/src/ganv-private.h b/src/ganv-private.h index a5d7047..ad36e21 100644 --- a/src/ganv-private.h +++ b/src/ganv-private.h @@ -189,6 +189,12 @@ ganv_canvas_port_event(GanvCanvas* canvas, void ganv_item_invoke_update(GanvItem* item, int flags); +/* Edge */ + +void +ganv_edge_request_redraw(GanvCanvasBase* canvas, + const GanvEdgeCoords* coords); + #ifdef __cplusplus } /* extern "C" */ #endif |