diff --git a/crates/gpui_widgets/src/curve_editor/mod.rs b/crates/gpui_widgets/src/curve_editor/mod.rs index f3885af9fa..a9a2e04feb 100644 --- a/crates/gpui_widgets/src/curve_editor/mod.rs +++ b/crates/gpui_widgets/src/curve_editor/mod.rs @@ -116,6 +116,12 @@ impl CurveEditor { &self.points } + /// Whether a point/handle drag is in progress (hosts must not push a + /// `set_points` re-sync mid-drag — it would steal the gesture). + pub fn is_dragging(&self) -> bool { + self.pending_drag.is_some() + } + /// Apply the host's reconciled curve and repaint. pub fn set_points(&mut self, points: Vec, cx: &mut Context) { self.points = points;