summaryrefslogtreecommitdiff
path: root/src/wx/timecode.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-03-20 10:31:07 +0100
committerCarl Hetherington <cth@carlh.net>2021-03-20 10:31:07 +0100
commit2b7db93970b37c9b21d4eff0c6d2955502ec7098 (patch)
tree5ca09cc664ab8984a0c7b9e8c776ef719c64ccc3 /src/wx/timecode.h
parentef31a94cd00dcc88fc83093cbc709b5b79acc4b6 (diff)
Fix setting of fade in/out on multiple pieces of content at the same time (#1934).
Diffstat (limited to 'src/wx/timecode.h')
-rw-r--r--src/wx/timecode.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/wx/timecode.h b/src/wx/timecode.h
index 3fe35981d..ccab0ecfc 100644
--- a/src/wx/timecode.h
+++ b/src/wx/timecode.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013-2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -22,6 +22,7 @@
#define DCPOMATIC_WX_TIMECODE_H
#include "wx_util.h"
+#include "lib/dcpomatic_time.h"
#include "lib/types.h"
#include <dcp/raw_convert.h>
#include <wx/wx.h>
@@ -87,7 +88,7 @@ public:
_frames->SetHint (std_to_wx(dcp::raw_convert<std::string>(hmsf.f)));
}
- T get (float fps) const
+ dcpomatic::HMSF get () const
{
auto value_or_hint = [](wxTextCtrl const * t) {
auto s = wx_to_std (t->GetValue().IsEmpty() ? t->GetHint() : t->GetValue());
@@ -97,15 +98,15 @@ public:
return dcp::raw_convert<int>(s);
};
- return T (
- {
- value_or_hint(_hours),
- value_or_hint(_minutes),
- value_or_hint(_seconds),
- value_or_hint(_frames)
- },
- fps
- );
+ return { value_or_hint(_hours),
+ value_or_hint(_minutes),
+ value_or_hint(_seconds),
+ value_or_hint(_frames) };
+ }
+
+ T get (float fps) const
+ {
+ return T(get(), fps);
}
};