From b1f581c2fd444dfb676fd96fbc5017e29a5db424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Mon, 9 Sep 2024 14:45:53 +0200 Subject: [PATCH] graphview: update graph on drag end Allow to save the graph on drag end --- src/graphmanager/graphview.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/graphmanager/graphview.rs b/src/graphmanager/graphview.rs index d8270b3..5d3b6f5 100644 --- a/src/graphmanager/graphview.rs +++ b/src/graphmanager/graphview.rs @@ -164,6 +164,14 @@ mod imp { ); }); + drag_controller.connect_drag_end(|drag_controller, _x, _y| { + let widget = drag_controller + .widget() + .dynamic_cast::() + .expect("drag-update event is not on the GraphView"); + widget.graph_updated(); + }); + let gesture = gtk::GestureClick::new(); gesture.set_button(0); gesture.connect_pressed(