projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://carlh.dyndns.org/home/carl/git/dcpomatic
[dcpomatic.git]
/
src
/
wx
/
timeline_dialog.cc
diff --git
a/src/wx/timeline_dialog.cc
b/src/wx/timeline_dialog.cc
index 9493d0acbcfa2ad02d3c9a7cdac3258a167091a5..dbf7ae232be2cd5f72dd8a247e98a80fff968fa7 100644
(file)
--- a/
src/wx/timeline_dialog.cc
+++ b/
src/wx/timeline_dialog.cc
@@
-33,10
+33,24
@@
TimelineDialog::TimelineDialog (FilmEditor* ed, shared_ptr<Film> film)
, _timeline (this, ed, film)
{
wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
, _timeline (this, ed, film)
{
wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
-
+
+ wxBoxSizer* controls = new wxBoxSizer (wxHORIZONTAL);
+ _snap = new wxCheckBox (this, wxID_ANY, _("Snap"));
+ controls->Add (_snap);
+
+ sizer->Add (controls, 0, wxALL, 12);
sizer->Add (&_timeline, 1, wxEXPAND | wxALL, 12);
SetSizer (sizer);
sizer->Layout ();
sizer->SetSizeHints (this);
sizer->Add (&_timeline, 1, wxEXPAND | wxALL, 12);
SetSizer (sizer);
sizer->Layout ();
sizer->SetSizeHints (this);
+
+ _snap->SetValue (_timeline.snap ());
+ _snap->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&TimelineDialog::snap_toggled, this));
+}
+
+void
+TimelineDialog::snap_toggled ()
+{
+ _timeline.set_snap (_snap->GetValue ());
}
}