diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-03-30 01:24:41 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-03-30 01:24:41 +0200 |
| commit | ab09ce82e22e62e6142c7edb67c96c8b3b80179c (patch) | |
| tree | c681cf86abb6bc376ffb909bba107eedcf723d0b | |
| parent | 2279660c63e8ebecfb352e3fc354e8cb5f2d58e6 (diff) | |
Add + and - as zoom shortcuts in the timeline.
| -rw-r--r-- | src/wx/timeline.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 2b8fba6fd..de83e6ba3 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -969,7 +969,17 @@ Timeline::keypress(wxKeyEvent const& event) { if (event.GetKeyCode() == WXK_DELETE) { auto film = _film.lock(); + DCPOMATIC_ASSERT(film); film->remove_content(selected_content()); + } else { + switch (event.GetRawKeyCode()) { + case '+': + set_pixels_per_second(_pixels_per_second.get_value_or(1) * 2); + break; + case '-': + set_pixels_per_second(_pixels_per_second.get_value_or(1) / 2); + break; + } } } |
