From f1085211aad0b2e5115984b2d17d2bc1971b86ef Mon Sep 17 00:00:00 2001 From: sam edelsten <samedelsten1@gmail.com> Date: Mon, 11 Sep 2023 18:47:03 +0100 Subject: [PATCH] fix selection appearing when changing editor --- src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index b8bc4db..222612d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -932,7 +932,11 @@ pub fn cosmic_edit_bevy_events( camera_transform, ) { let (x, y) = point(node_cursor_pos); - editor.action(&mut font_system.0, Action::Drag { x, y }); + if active_editor.is_changed() && !shift { + editor.action(&mut font_system.0, Action::Click { x, y }); + } else { + editor.action(&mut font_system.0, Action::Drag { x, y }); + } } return; } -- GitLab