Merge pull request #1898 from hannobraun/viewer

Fix mouse input
This commit is contained in:
Hanno Braun 2023-06-20 09:47:12 +02:00 committed by GitHub
commit d32c95762f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -32,7 +32,7 @@ pub fn display(model: Model, invert_zoom: bool) -> Result<(), Error> {
&event, &event,
&window, &window,
&held_mouse_button, &held_mouse_button,
&mut viewer.cursor(), viewer.cursor(),
invert_zoom, invert_zoom,
); );
if let Some(input_event) = input_event { if let Some(input_event) = input_event {