diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-11 21:05:56 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-11 21:05:56 +0200 |
| commit | 72f6f3de6a098cc74394e047aaa3fa5f9f44aa83 (patch) | |
| tree | 0f83898e07b18f18694a09e2209e8418454bab19 /src/wx/film_viewer.cc | |
| parent | a98f6e4f84d02b87ba05cecfcc3005858f274afa (diff) | |
Use case for property checks now that it's possible.
This would have prevented the bug fixed in 6bbf7dee.
Diffstat (limited to 'src/wx/film_viewer.cc')
| -rw-r--r-- | src/wx/film_viewer.cc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index b77ff987c..ba0651b14 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -457,21 +457,22 @@ FilmViewer::player_change(vector<int> properties) bool update_ccap_tracks = false; for (auto i: properties) { - if ( - i == VideoContentProperty::CROP || - i == VideoContentProperty::CUSTOM_RATIO || - i == VideoContentProperty::CUSTOM_SIZE || - i == VideoContentProperty::FADE_IN || - i == VideoContentProperty::FADE_OUT || - i == VideoContentProperty::COLOUR_CONVERSION || - i == PlayerProperty::VIDEO_CONTAINER_SIZE || - i == PlayerProperty::FILM_CONTAINER - ) { + switch (i) { + case VideoContentProperty::CROP: + case VideoContentProperty::CUSTOM_RATIO: + case VideoContentProperty::CUSTOM_SIZE: + case VideoContentProperty::FADE_IN: + case VideoContentProperty::FADE_OUT: + case VideoContentProperty::COLOUR_CONVERSION: + case PlayerProperty::VIDEO_CONTAINER_SIZE: + case PlayerProperty::FILM_CONTAINER: try_quick_refresh = true; - } - - if (i == TextContentProperty::USE || i == TextContentProperty::TYPE || i == TextContentProperty::DCP_TRACK) { + break; + case TextContentProperty::USE: + case TextContentProperty::TYPE: + case TextContentProperty::DCP_TRACK: update_ccap_tracks = true; + break; } } |
