mirror of
https://github.com/hannobraun/Fornjot
synced 2025-01-10 18:27:18 +00:00
Remove redundant code
This commit is contained in:
parent
73476e5541
commit
0ad2699f6d
@ -27,7 +27,6 @@ pub fn display(model: Model, invert_zoom: bool) -> Result<(), Error> {
|
|||||||
invert_zoom,
|
invert_zoom,
|
||||||
window: None,
|
window: None,
|
||||||
viewer: None,
|
viewer: None,
|
||||||
held_mouse_button: None,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
event_loop.run_app(&mut display_state)?;
|
event_loop.run_app(&mut display_state)?;
|
||||||
@ -56,7 +55,6 @@ struct DisplayState {
|
|||||||
invert_zoom: bool,
|
invert_zoom: bool,
|
||||||
window: Option<Window>,
|
window: Option<Window>,
|
||||||
viewer: Option<Viewer>,
|
viewer: Option<Viewer>,
|
||||||
held_mouse_button: Option<MouseButton>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ApplicationHandler for DisplayState {
|
impl ApplicationHandler for DisplayState {
|
||||||
@ -125,11 +123,9 @@ impl ApplicationHandler for DisplayState {
|
|||||||
WindowEvent::MouseInput { state, button, .. } => {
|
WindowEvent::MouseInput { state, button, .. } => {
|
||||||
match state {
|
match state {
|
||||||
ElementState::Pressed => {
|
ElementState::Pressed => {
|
||||||
self.held_mouse_button = Some(button);
|
|
||||||
viewer.add_focus_point();
|
viewer.add_focus_point();
|
||||||
}
|
}
|
||||||
ElementState::Released => {
|
ElementState::Released => {
|
||||||
self.held_mouse_button = None;
|
|
||||||
viewer.remove_focus_point();
|
viewer.remove_focus_point();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user