summaryrefslogtreecommitdiff
path: root/src/wx/timeline_dialog.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-10 15:00:41 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-10 15:00:41 +0100
commitb3d598f551a874b34ff4fb51a0a65631fc3ad070 (patch)
tree60fb477fb709e852914b185b7b9ff7f49555a3eb /src/wx/timeline_dialog.cc
parent895751dcac8caeb03e8af8ba286b4297f8f85e0b (diff)
Basic snapping in the timeline.
Diffstat (limited to 'src/wx/timeline_dialog.cc')
-rw-r--r--src/wx/timeline_dialog.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc
index 9493d0acb..dbf7ae232 100644
--- 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);
-
+
+ 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);
+
+ _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 ());
}