diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-25 02:09:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-25 02:09:11 +0100 |
| commit | 30437007ba00ab45bdbdb490b10e49ea2570636a (patch) | |
| tree | dfbe16398097638f0e1234e831dd66f4aed03f08 /src | |
| parent | 7d344b1ecad24ee573c9da06d454e696a8149e5a (diff) | |
Try to fix range UI a little.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/film.cc | 10 | ||||
| -rw-r--r-- | src/lib/film.h | 1 | ||||
| -rw-r--r-- | src/wx/film_editor.cc | 7 |
3 files changed, 17 insertions, 1 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index e8a23377d..b92d8d2fa 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -1076,6 +1076,16 @@ Film::set_dcp_frames (int f) } void +Film::unset_dcp_frames () +{ + { + boost::mutex::scoped_lock lm (_state_mutex); + _dcp_frames = boost::none; + } + signal_changed (DCP_FRAMES); +} + +void Film::set_dcp_trim_action (TrimAction a) { { diff --git a/src/lib/film.h b/src/lib/film.h index 131891706..3eff9e3da 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -349,6 +349,7 @@ public: void set_filters (std::vector<Filter const *>); void set_scaler (Scaler const *); void set_dcp_frames (int); + void unset_dcp_frames (); void set_dcp_trim_action (TrimAction); void set_dcp_ab (bool); void set_audio_stream (int); diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 91db579c5..3e5079cc5 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -776,7 +776,12 @@ FilmEditor::change_dcp_range_clicked (wxCommandEvent &) void FilmEditor::dcp_range_changed (int frames, TrimAction action) { - _film->set_dcp_frames (frames); + if (frames == 0) { + _film->unset_dcp_frames (); + } else { + _film->set_dcp_frames (frames); + } + _film->set_dcp_trim_action (action); } |
