From 8d850bef540fa6d53ee917a1eb26f7f473b31ed3 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Mon, 18 Nov 2024 20:35:42 +0100 Subject: [PATCH] Simplify --- crates/fj-viewer/src/viewer.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/crates/fj-viewer/src/viewer.rs b/crates/fj-viewer/src/viewer.rs index 441d30eb2..42c9ac802 100644 --- a/crates/fj-viewer/src/viewer.rs +++ b/crates/fj-viewer/src/viewer.rs @@ -91,7 +91,7 @@ impl Viewer { y: -(y / height * 2. - 1.) / aspect_ratio, }; - let event = if let (Some(cursor_old), Some(button)) = + if let (Some(cursor_old), Some(button)) = (self.cursor, self.most_recent_mouse_button) { match button { @@ -110,8 +110,6 @@ impl Viewer { focus_point, ); } - - None } MouseButton::Right => { if let Some(focus_point) = self.focus_point { @@ -121,14 +119,8 @@ impl Viewer { focus_point, ); } - None } } - } else { - None - }; - if let Some(event) = event { - self.handle_input_event(event); } self.cursor = Some(cursor_new);