From 72f6f3de6a098cc74394e047aaa3fa5f9f44aa83 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 11 May 2025 21:05:56 +0200 Subject: Use case for property checks now that it's possible. This would have prevented the bug fixed in 6bbf7dee. --- src/wx/content_timeline.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/wx/content_timeline.cc') diff --git a/src/wx/content_timeline.cc b/src/wx/content_timeline.cc index 7200bf076..f4388b2be 100644 --- a/src/wx/content_timeline.cc +++ b/src/wx/content_timeline.cc @@ -335,13 +335,21 @@ ContentTimeline::film_content_change(ChangeType type, int property, bool frequen ensure_ui_thread (); - if (property == AudioContentProperty::STREAMS || property == VideoContentProperty::FRAME_TYPE) { + switch (property) { + case AudioContentProperty::STREAMS: + case VideoContentProperty::FRAME_TYPE: recreate_views (); - } else if (property == ContentProperty::POSITION || property == ContentProperty::LENGTH) { + break; + case ContentProperty::POSITION: + case ContentProperty::LENGTH: _reels_view->force_redraw (); - } else if (!frequent) { - setup_scrollbars (); - Refresh (); + break; + default: + if (!frequent) { + setup_scrollbars (); + Refresh (); + } + break; } } -- cgit v1.2.3