From c4d93c8f1d22124dd51b34655d8dc59687f2b9e3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 21 Feb 2026 02:32:48 +0100 Subject: 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. --- src/wx/content_timeline.cc | 4 +--- src/wx/content_timeline.h | 1 - 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, 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 _last_mouse_wheel_x; boost::optional _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 #endif ) , _film (film) - , _timeline (this, cp, film, viewer) + , _timeline(this, film, viewer) { auto sizer = new wxBoxSizer (wxVERTICAL); -- cgit v1.2.3