diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-02-21 02:32:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-02-21 02:32:54 +0100 |
| commit | c4d93c8f1d22124dd51b34655d8dc59687f2b9e3 (patch) | |
| tree | 42441aeea97866ced50cbeeb6734b91413f5fa9e | |
| parent | 0de22230138c3cda3aa3d824f87eb5d806e595fc (diff) | |
Always resize timeline content when changing the window size.
This is probably still quite annoying, as you can zoom to a particular
place, change the window size, and your zoom is gone. But I think it's
still preferably to the previous.
| -rw-r--r-- | src/wx/content_timeline.cc | 4 | ||||
| -rw-r--r-- | src/wx/content_timeline.h | 1 | ||||
| -rw-r--r-- | src/wx/content_timeline_dialog.cc | 2 |
3 files changed, 2 insertions, 5 deletions
diff --git a/src/wx/content_timeline.cc b/src/wx/content_timeline.cc index 5d7f80b8a..e9056c14d 100644 --- a/src/wx/content_timeline.cc +++ b/src/wx/content_timeline.cc @@ -85,7 +85,6 @@ ContentTimeline::ContentTimeline(wxWindow* parent, shared_ptr<Film> film, FilmVi , _x_scroll_rate(16) , _y_scroll_rate(16) , _pixels_per_track(48) - , _first_resize(true) , _timer(this) { #ifndef __WXOSX__ @@ -886,9 +885,8 @@ ContentTimeline::film() void ContentTimeline::resized() { - if (_main_canvas->GetSize().GetWidth() > 0 && _first_resize) { + if (_main_canvas->GetSize().GetWidth() > 0) { zoom_all(); - _first_resize = false; } setup_scrollbars(); } diff --git a/src/wx/content_timeline.h b/src/wx/content_timeline.h index 2653701b9..af9a70173 100644 --- a/src/wx/content_timeline.h +++ b/src/wx/content_timeline.h @@ -139,7 +139,6 @@ private: int _x_scroll_rate; int _y_scroll_rate; int _pixels_per_track; - bool _first_resize; wxTimer _timer; boost::optional<int> _last_mouse_wheel_x; boost::optional<double> _last_mouse_wheel_time; diff --git a/src/wx/content_timeline_dialog.cc b/src/wx/content_timeline_dialog.cc index 4d1bbb1d4..4860922b6 100644 --- a/src/wx/content_timeline_dialog.cc +++ b/src/wx/content_timeline_dialog.cc @@ -59,7 +59,7 @@ ContentTimelineDialog::ContentTimelineDialog(ContentPanel* cp, shared_ptr<Film> #endif ) , _film (film) - , _timeline (this, cp, film, viewer) + , _timeline(this, film, viewer) { auto sizer = new wxBoxSizer (wxVERTICAL); |
