projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PlainText -> PlainTextFile.
[dcpomatic.git]
/
src
/
wx
/
timing_panel.cc
diff --git
a/src/wx/timing_panel.cc
b/src/wx/timing_panel.cc
index d7ed46f467eca85192d6b6c355cf375830a72d9b..93ac0278438bac6ff8932f4e0ecaa094fc123be3 100644
(file)
--- a/
src/wx/timing_panel.cc
+++ b/
src/wx/timing_panel.cc
@@
-26,10
+26,10
@@
#include "move_to_dialog.h"
#include "lib/content.h"
#include "lib/image_content.h"
#include "move_to_dialog.h"
#include "lib/content.h"
#include "lib/image_content.h"
-#include "lib/
subtitle
_content.h"
-#include "lib/dcp_
subtitle
_content.h"
+#include "lib/
text
_content.h"
+#include "lib/dcp_
text
_content.h"
#include "lib/audio_content.h"
#include "lib/audio_content.h"
-#include "lib/
text_subtit
le_content.h"
+#include "lib/
plain_text_fi
le_content.h"
#include "lib/video_content.h"
#include <dcp/locale_convert.h>
#include <boost/foreach.hpp>
#include "lib/video_content.h"
#include <dcp/locale_convert.h>
#include <boost/foreach.hpp>
@@
-395,7
+395,7
@@
TimingPanel::play_length_changed ()
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
i->set_trim_end (
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
i->set_trim_end (
- ContentTime (
i->full_length() - play_length
, frc) - i->trim_start ()
+ ContentTime (
max(DCPTime(), i->full_length() - play_length)
, frc) - i->trim_start ()
);
}
}
);
}
}
@@
-409,9
+409,16
@@
TimingPanel::video_frame_rate_changed ()
void
TimingPanel::set_video_frame_rate ()
{
void
TimingPanel::set_video_frame_rate ()
{
- double const fr = locale_convert<double> (wx_to_std (_video_frame_rate->GetValue ()));
+ optional<double> fr;
+ if (_video_frame_rate->GetValue() != wxT("")) {
+ fr = locale_convert<double> (wx_to_std (_video_frame_rate->GetValue ()));
+ }
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
- i->set_video_frame_rate (fr);
+ if (fr) {
+ i->set_video_frame_rate (*fr);
+ } else {
+ i->unset_video_frame_rate ();
+ }
}
_set_video_frame_rate->Enable (false);
}
_set_video_frame_rate->Enable (false);