From 808e191fdaab3ce7f825974153fa67d52556171c Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 20 Jun 2023 09:43:25 +0200 Subject: [PATCH] Fix mouse input --- crates/fj-viewer/src/viewer.rs | 4 ++-- crates/fj-window/src/display.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/fj-viewer/src/viewer.rs b/crates/fj-viewer/src/viewer.rs index 95f423bbe..3f9ea1898 100644 --- a/crates/fj-viewer/src/viewer.rs +++ b/crates/fj-viewer/src/viewer.rs @@ -36,8 +36,8 @@ impl Viewer { } /// Access the cursor - pub fn cursor(&self) -> Option { - self.cursor + pub fn cursor(&mut self) -> &mut Option { + &mut self.cursor } /// Toggle the "draw model" setting diff --git a/crates/fj-window/src/display.rs b/crates/fj-window/src/display.rs index 3acfd7548..239fa85c2 100644 --- a/crates/fj-window/src/display.rs +++ b/crates/fj-window/src/display.rs @@ -32,7 +32,7 @@ pub fn display(model: Model, invert_zoom: bool) -> Result<(), Error> { &event, &window, &held_mouse_button, - &mut viewer.cursor(), + viewer.cursor(), invert_zoom, ); if let Some(input_event) = input_event {