Fix mouse input

This commit is contained in:
Hanno Braun 2023-06-20 09:43:25 +02:00
parent 9b6feb7222
commit 808e191fda
2 changed files with 3 additions and 3 deletions

View File

@ -36,8 +36,8 @@ impl Viewer {
}
/// Access the cursor
pub fn cursor(&self) -> Option<NormalizedScreenPosition> {
self.cursor
pub fn cursor(&mut self) -> &mut Option<NormalizedScreenPosition> {
&mut self.cursor
}
/// Toggle the "draw model" setting

View File

@ -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 {