Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
bertiqwerty committed Aug 10, 2024
1 parent d139d06 commit 84b6079
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
12 changes: 0 additions & 12 deletions rvimage/src/rvlib/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,6 @@ impl Events {
}
})
}
pub fn mouse_wheel(&self) -> Option<i64> {
self.events
.iter()
.find(|e| matches!(e, Event::MouseWheel(_)))
.map(|e| match e {
Event::MouseWheel(d) => *d,
_ => {
unreachable!();
}
})
}
action_keycode!(held_alt, Held, Alt);
action_keycode!(held_shift, Held, Shift);
action_keycode!(held_ctrl, Held, Ctrl);
Expand Down Expand Up @@ -136,6 +125,5 @@ pub enum Event {
Pressed(KeyCode),
Released(KeyCode),
Held(KeyCode),
MouseWheel(i64),
Zoom(ZoomAmount),
}
3 changes: 1 addition & 2 deletions rvimage/src/rvlib/tools/always_active_zoom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ impl Manipulate for AlwaysActiveZoom {
|| events.held_ctrl()
&& (events.released(KeyCode::Key0)
|| events.released(KeyCode::PlusEquals)
|| events.released(KeyCode::Minus)
|| events.mouse_wheel().is_some());
|| events.released(KeyCode::Minus));
Some(zoomed || event_move_zoom_box(events))
}
fn events_tf(
Expand Down

0 comments on commit 84b6079

Please sign in to comment.