diff --git a/crates/ui-egui/src/control/dispatch.rs b/crates/ui-egui/src/control/dispatch.rs index 85bd8d8d82..80f474e3b7 100644 --- a/crates/ui-egui/src/control/dispatch.rs +++ b/crates/ui-egui/src/control/dispatch.rs @@ -1273,7 +1273,9 @@ fn pointer_eyedropper_took(app: &mut PhotocraftApp, ctx: &egui::Context, g: &Poi let down = matches!(s.ev, ToolEvent::Down { .. }); // With the Color Picker on top the image is its eyedropper, as for the mouse. if crate::color_picker_ui::top(app).is_some() { - if !matches!(s.ev, ToolEvent::Up { .. }) { + if matches!(s.ev, ToolEvent::Up { .. }) { + crate::tools::transform_tool::release_handle_drag(app); + } else { crate::color_picker_ui::sample_at(app, x, y); } return true; diff --git a/crates/ui-egui/src/tools/transform_tool.rs b/crates/ui-egui/src/tools/transform_tool.rs index bf11ca303e..f3f6ee7b9b 100644 --- a/crates/ui-egui/src/tools/transform_tool.rs +++ b/crates/ui-egui/src/tools/transform_tool.rs @@ -246,6 +246,13 @@ pub fn handle_tolerance(app: &PhotocraftApp) -> f64 { HANDLE_PX / app.point_zoom().max(0.01) as f64 } +/// End a handle drag whose release a modal sampler consumed, preserving the transform. +pub(crate) fn release_handle_drag(app: &mut PhotocraftApp) { + if let Some(preview) = app.transform_preview.as_mut() { + preview.gesture = None; + } +} + /// The box as one undo step restores it. #[derive(Clone, Debug, PartialEq)] struct Step {